wpf

Nesting WPF Paths

I'm trying to create a Venn diagram control for an application I'm working on in WPF. I just want to create a two way Venn at the moment, so two circles overlapping each other. There are two features I'm trying to get working: 1. The control must resize the Venn to fill the available space. 2. Each section of the Venn should take mouse ...

WPF DataGrid - Hiding Column using a CheckBox

I am trying to control the visibility of a column using a checkbox (this is in WPF 4.0). Here is a snippet of my XAML: <Window.Resources> <BooleanToVisibilityConverter x:Key="BoolToVisConverter" /> </Window.Resources> <CheckBox x:Name="GeneralDetailsVisible" Content="General Details" Margin="5"/> <DataGridTextColumn Header="Crew...

Whats an easy way to fill a Concave PathGeometry to be Convex (finding the concave vertices & removing them)?

I've got a PathGeometry (polygon) built up of LineSegments on one PathFigure and I'd like to ensure that it's Convex. I have a method using the CrossProduct to determine whether the geometry is Convex, I was assuming that I could just return back a list of points that make it concave when it's false and remove those points to fill the p...

Using WPF's TreeView to draw trees

I'd like to use a WPF System.Windows.Controls.TreeView to visualize a tree in the style of graph/network layout (e.g. graphviz). The default layout of the TreeView control looks, of course, like Windows Explorer's directory viewer. So I need to change the layout to put the root at the top, its children spaced out beneath it and so on. M...

Can I create a navigation control like this example in WPF using a TreeView?

I want to create a WPF control similar to the example below. Check out the link and look at the navigation control on the left. Can this be done in a treeview? If so, any idea how I would start? If not a treeview, then how could I achieve the same thing? Navigation example The parent node has a different style to the child node and i...

Passing WPF user control selection to host control

I have a WPF user control with a list box. I want to pass the selected item in the list box to the calling control thru binding. How to achieve this? Appreciate your help! ...

Hyperlink Navigationuri with parameter wpf

Hi All, I want to set navigateURI to the dynamically created hyperlink. I am using the following code but it is not navigation to the page if i pass parameter. showing the following error. Code: Hyperlink hlProduct = new Hyperlink(new InlineUIContainer(img)); hlProduct.NavigateUri = new Uri("Player.xaml?id=109", UriKind.Relative...

WPF Performance

I am building a simple photo gallery application which shows images in a listbox. The xaml is: <ListBox x:Name="imageList" Margin="10,10" ItemsSource="{Binding}" Height="500"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding}" Ho...

WPF Listview filtered items

I have a listview which is filtered by the text entered by the user. Is there anyway to get the visible items from the listview? ...

Is WPF an extraordinary thing?

As long as I program, I always did it with MS-technologies. There was DOS, MFC , VB6, then .net with WinForms and now WPF. In all these technologies, the GUI-thing was always more or less the same, because it based on Win32 (except DOS). With WPF now all has totally changed. MS introduced a lot of new possibilities, beginning with the d...

Difference between x:Key and x:Name

What is the difference between x:Key and x:Name in WPF? ...

TextBox control template with buttons

How to improve control template for custom numericupdown? <Style TargetType="{x:Type Controls:FloatTextBoxPicker}" BasedOn="{StaticResource {x:Type TextBox}}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Controls:FloatTextBoxPicker}"> <DockPanel LastChildFill="True"> ...

Sorting a PagedCollectionView by index (using Silverlight Datagrid)

I have a silverlight datagrid which is bound to a PagedCollectionView displaying a collection of RowViewModels. Each RowVM has a collection of CellViewModels, and the datagrid columns are templatecolumns and are generated dynamically with their content bound to Cell[0].Content, Cell[1].Content, etc. This is because the rowviewmodels ar...

wpf datagrid vs listbox

I have been using listboxes in my application. Now I'm considering using datagrids instead. Is there anything that can be done in a LISTBOX that cannot be done in a listbox? thanks, Richard ...

Reload parent window from a pop-up ("child") window

Hi, How it is possible? The idea is to enter info into a form inside a pop-up/child window, and then, as you save/close it, it automatically updates the "Parent" window, from which the pop-up was originally open. Kindly Suggest, Thanks ...

Order Images in ListBox DataTemplate Horizontally

Preview On the highlighted item, the images still ordered vertically even I already use <StackPanel Orientation="Horizontal">. Am I missing something? I don't want the images have ListBoxItem behavior (hover/click). I had added IsEnabled="False" to the list box, but the images' opacity decreased : ( Do you have any idea how to do thi...

WPF pass data-generated parameter to Method through XAML

I am writing a "problem resolver" for a despatch app. The despatch app prints labels using a piece of software supplied by the UKs Royal Mail postal service. The software ensures that the addresses on the labels are "correct" as per the Royal mail's database of valid addresses, it renders a trackable code in alphanumeric and barcoded fo...

When to use XamlWriter.Save() to serialize domain object?

What's the rationale (if any) of using XamlWriter.Save() to serialize a domain object? Please describe realistic scenarios. Thanks. ...

childWindow Full Screen Event tweak the Parent to also FullSCreen Mode

Hi, I have a ChildWindow which contains a ExpressionMediaPlayer inside it. When I click on the ChildWindow Media Player Full screen button it swiches the whole application to FullScreen Mode. Is there a way to avoid it. I am not quite sure if this scenario is going to fall under SL security restrictions. When I drag the ChildWindow(t...

How to give error feedback during a drag operation?

I am trying to give some visual feedback to the user during a drag/drop operation. The feedback I'm struggling with is in the case where the drag target is somehow invalid for the type of data being dragged. I'd like there to be some feedback (during the drag) which displays a small message as to why the drag would be invalid. I am tr...