|
Hi,
I have a requirement in which i need to show
1. a Plane of a Cube ( Plane will be selected by the users by setting the apporpriate x,y and Z values) and i need to plot the Tempreture data (i get an array of X y z and Tempreture values in an Array) on it .
Can anyone give me some idea ?
2. I will be given an Array of X,y,Z points and i need to plot them.
I am not sure how i can do this in WPF ?
Any help will be highly appreciated .
|
|
|
|
|
I think I am working on something somewhat similar and while I am probably ahead of you on this one, I am a long, long way from done. A screenshot of where I am now is shown below.
Basically, the way I am doing it, I have three planes, one for each axis. I also have a two dimensional user control that does two dimensional XY graphs. I am using three VisualBrushes, one for each plane and passing an instance of the two dimensional usercontrol into the constructor of those VisualBrushes. I am then using those VisualBrushes to texture the three axis planes. For the points, I am creating spherical meshes and positioning them inside of the XYZ chart area.
When I finally get done with this whole thing, which won’t happen anytime soon, I will do one or more posts on it on my blog with source code. However, I am so far from done that that may be a while. I won’t publish the code that I have at this point in time because it is so crude and filled with quick and dirty workarounds that I don’t want it on the web in its current form. I hope this helps at least with the getting started part though.
http://www.trentfguidry.net/MyImages/Peng-Robinson-Methanol-Graph.jpg
Niladri Biswas
|
|
|
|
|
Any third party control for Data Grid with all the event as in WINFORM DataGrid for WPF?
|
|
|
|
|
There's one in the WPF Toolkit[^].
The toolkit is where you can get your hands on controls before they make it into the
.NET framework.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Infragistics WPF control. We are heavily using it.
Try that.
Or else, in codeplex, you will get WPF datagrid.
Search in google for the same
Niladri Biswas
|
|
|
|
|
Does anybody know where i can get very powerful open source 3d wpf charts. I'm looking for charts with onclick events and rich color shading and filling. The module should also provide pie charts.
Thx in advance
|
|
|
|
|
Visifire is an open Source WPF Charting component.
|
|
|
|
|
hi all,
i have a writableBitmap which i want to save on server. Is there any way to save it may be using webservice?? i Dont kno!!!
Thanks in advance
Samir
|
|
|
|
|
Serialize the bitmap as a stream of bytes and send it tot he server via a web service where it gets converted back into a bitmap and saved?
|
|
|
|
|
hi Ray,
Thanks For your quick Reply.. Can u tell me a way to convert Writable Bitmap to memory stream? i was trying the same but there is no way directly to convert Writable bitmap to memory stream.
Thanks in advance
Samir Satadekar
|
|
|
|
|
Hi, i am trying to make a WPF listview control that contains a gridview. The problem is when i run the application, at one time user can select just 1 row of the grid. If user selects another row, the previous row selected is un-selected automatically i have tried using cntrl+ mouseclick still i can not select multiple grid view rows.
What exactly i want to do is, i would like to display gridview's coloumn(0) value of all the selected rows(concatinating each value) in the some textbox. Can anyone Please help?
My code is:
<DataTemplate x:Key="FirstCell">
<StackPanel Orientation="Horizontal">
<CheckBox IsChecked="{Binding Path=IsSelected,
RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListViewItem}}}" >
</CheckBox>
</StackPanel>
</DataTemplate>
<ListView
ItemsSource="{Binding}"
IsSynchronizedWithCurrentItem="True" Name="ListView1" Margin="218,83,25,88"
ScrollViewer.CanContentScroll="True" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
SelectionChanged="ListView1_SelectionChanged" SelectionMode="Multiple">
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<EventSetter Event="GotFocus" Handler="Item_GotFocus" />
</Style>
</ListView.ItemContainerStyle>
<ListView.View >
<GridView x:Name="Grid1" >
<GridViewColumn Header="Code" Width="70" >
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBox Text="{Binding Path=Code}"
Margin="-6,0,-6,0" x:Name="Codename"/>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="Discription" Width="70" >
<GridViewColumn.CellTemplate>
<DataTemplate >
<TextBox Text="{Binding Path=Description}"
Margin="-6,0,-6,0" x:Name="Descriptionname" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn CellTemplate="{StaticResource FirstCell}"
Width="30"/>
</GridView>
</ListView.View>
</ListView>
|
|
|
|
|
SR81 wrote: The problem is when i run the application, at one time user can select just 1 row of the grid. If user selects another row, the previous row selected is un-selected automatically
Your code works for me. Multiple selections work - no CTRL key necessary.
Only change I made is fixed the broken FirstCell data template (it wouldn't compile
so I removed the binding from the checkbox) and removed all event handlers since you didn't
provide the code.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Always use
SelectionMode="Extended"
and not SelectionMode="Multiple"
Try this and vote me
Niladri Biswas
|
|
|
|
|
We are using WPF Dock as Prism Extension in our project. That extension can be downloaded from CompositeWPFContrib website. Currently, we are having some issues with Dock and Popup control. Please read more details about that problem in steps to reproduce.
http://michaelsync.net/demo/CALApplication.Shell.doc
Note: Please download the attachement and change the file extension "doc" to "zip".
1. Run the application
2. Click on Menu #1
3. Select "Customer Details"
4. Click on "Open Pupup" button
5. Click on "Open View 2" (View2 will be opened)
6. Click on "Customer Details" tab
Observe: Tab will be automatically moved back to "View2".
Note: It happens only when we are launching the VIew2 from Popup. If we move the command " Command="{Binding LaunchView2Command}"" to button above Popup, it won't happen. Not sure whether there is any relationship between Popup and Dock or Popup and Prism.
|
|
|
|
|
I have a stackpanel having one image and one stackpanel having button control.....
I want to do the same thing on StackPanel click as the button click which is the child of that stackpanel
How can I do that....?
I have wrote something on MouseLeftButtonDown event of stackpanel but not able to get the button name and content...
Anyhow i need the button name and content inside the stackpanel on MouseLeftButtonDown event of that stackpanel...
Can i get that?
Please help me, its very urgent....
|
|
|
|
|
salon wrote: something on MouseLeftButtonDown event of stackpanel but not able to get the button name and content.
I'm not sure what you're asking here....if the button is a child of the
stackpanel, and the button has a name, why are you unable to just use the
button by name?
Can you post a simple example of the xaml/code-behind involved to make it more clear?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks for kind and quick reply....
Problem is solved
|
|
|
|
|
|
How can I sort my ObservableCollection based on a double value?
My ObservableCollection consists of the following object:
<br />
public class MyData<br />
{<br />
public string Caption;<br />
public double Result;<br />
}<br />
I want to sort my collection based on the value of "Result".
Please help me to resolve this problem.
|
|
|
|
|
Do you want to sort the collection, or the view of the collection? The two are different. If you just want to sort the view, consider using CollectionViewSource[^].
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Thanks....
It really helped me a lot..... Thanks once again.....
|
|
|
|
|
Good answer Pete.
One question: suppose I want to sort the collection?
Thanks,
Blitz
|
|
|
|
|
Then I would recommend writing a specialist observable collection. Here's a variant of one I use:
public class SortObservableCollection<T> : ObservableCollection<T>
{
public void Sort<TResult>(Func<T, TResult> expression, ListSortDirection sortDirection)
{
switch (sortDirection)
{
case ListSortDirection.Ascending:
Sort(Items.OrderBy(expression));
break;
case ListSortDirection.Descending:
Sort(Items.OrderByDescending(expression));
break;
}
}
private void Sort(IEnumerable<T> items)
{
var sort = items.ToList();
foreach (var item in sort)
{
Move(IndexOf(item), sort.IndexOf(item));
}
}
}
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Pete O'Hanlon wrote: case ListSortDirection.Ascending:
Sort(Items.OrderBy(expression));
break;
case ListSortDirection.Descending:
Sort(Items.OrderByDescending(expression));
break;
I am not getting the method named "OrderBy" for Items....
|
|
|
|
|
Are you using .NET 3.5? OrderBy and OrderByDescending are extension methods.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|