wpf-controls

Show a grabber in a WPF StatusBar?

In WPF, how do I display a grabber (the mall dotted triangle in the lower right corner) in a StatusBar control? Thanks. ...

How to get value of selected item from multicolumn ComboBox in WPF

<ComboBox Name="ASelect" Width="180" Height="27" SelectedIndex="0" HorizontalContentAlignment="Center" VerticalAlignment="Center" SelectionChanged="ASelect_SelectionChanged"> <ComboBoxItem HorizontalContentAlignment="Right" VerticalContentAlignment="Center"> <StackPanel Orientation="Horizontal" Ho...

WPF Dynamic addition of controls to a window

Hi, I am programming a user control and I am adding buttons to the window using C# code. I read that i can create a Xaml document and then using the xamlReader load it to a Window. Both approaches work but witch one to you think will have the best performance? or witch one will you recomend Thanks !!! ...

WPF and Powershell - Handling events

Can anyone point me in the right direction for some documentation about handling WPF UI events in Powershell? I want to know how to, for example, call a function when a CheckBox or Radio Button is changed. Cheers! Ben ...

C# WPF Text with links

Hi all, I just found myself a new challenge: Make a Word Processor that is in handling more like the web than plain text. Designing a nice framework for this is what i cant wait to start with, but i do need to know what the possibilities are at the GUI side (it will probably have loads of GUI challenges). So the basic thing that I need...

What to use as the container with ribbon control?

I'm writing a data-entry software with lots of pages. For example one page for entering team data and another page for entering match data. I want to use the new fancy Microsoft ribbon control to organize different pages and categories. The problem is I'm new to WPF and I don't know what should I use for: a. The container of pages (s...

Code Contracts and Auto Generated Files

When I enabled code contracts on my WPF control project I ran into a problem with an auto generated file which was created at compile time (XamlNamespace.GeneratedInternalTypeHelper). Note, the generated file is called GeneratedInternalTypeHelper.g.cs and is not the same as the GeneratedInternalTypeHelper.g.i.cs which there are several o...

How can I render a wpf control to a DrawingContext?

Can I get a Geometry of a Visual/UIElement/FrameworkElement and use DrawingContext.DrawDrawing ? Currently I am using a RenderTargetBitmap, draw my Visual to it and use DrawingContext.DrawImage . ...

Possible to make value converter accessible only by my user control? (WPF)

So I've gotten in the habit of using WPF/C# value converters because they are awesome. I usually just have a folder set up for value converters and then access them in whatever xaml files I might need them. I'm currently developing a user control that will have some value converters that I do not want other classes to be able to access....

Looping through controls in WPF / Powershell

I am trying to loop through some controls in a Powershell / WPF application. Nothing fancy, just setting some text on a mouseEnter event. It works fine if I don't loop the code: $reader = New-Object System.Xml.XmlNodeReader $xaml $d = [Windows.Markup.XamlReader]::Load($reader) $d.FindName("GridOne").add_mouseEnter({ $d.Find...

HierarchicalDataTemplate problem

Hi i am building a user control in wpf and using a treeview, then using the HierarchicalDataTemplate to load the parts of the treeview using a Class called Node. <TreeView Name="T"> <TreeView.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Org...

How do you get a WPF ItemsControl item to fire a command upon pressing the spacebar?

I have a list of Hyperlinks in an ItemsControl and I would like the user to be able to press the spacebar to invoke the hyperlink's command when the hyperlink has focus (currently pressing enter does this as well - but its not so discoverable IMO). Here's my ItemsControl decl: <ItemsControl x:Uid="_commandsItemsControl" Name="_comm...

Microsoft Ribbon for WPF vs. Office RIbbon UI

Microsoft released Microsoft Ribbon for WPF available for download here. We also have RibbonControlsLibrary.dll, which is a ribbon control too, available for download from Office sites. Currenty it is in CTP version. Now, which is the difference between these 2 version of ribbons ? Until now I identified that: MS Ribbon for WPF doe...

wpf -shorcut key for image button

On my wpf window, I have got an image button. Does anyone have any idea how to assign a short cut for this button like "Cntrl + O". I can put "_" to trigger click on normal button. <Button Margin="89,73,114,106" Name="button1" Click="button1_Click"> <StackPanel Name="_StackPanel"> <Image Source="image.png" ></Image>...

How to increase the particular row height in the WPF DataGrid when mouse is over that row.

Hi, I want to increase the particular row height to twice in the WPF DataGrid when mouse is over that row but the remaining rows height should not be changed. When the mmouse moves over on the another row only that row height should be double and the previuos row height should become normal. Please let me know how to do this. Previous...

WPF: Handle editable hierarchical data / TreeView~DataGrid hybrid

I am looking for a WPF control which is a hybrid of TreeView and DataGrid, something like the Visual Studio debugger or QuickBooks contacts list etc. Any other solution on how to handle editable hierarchical data in WPF will be very welcommed as well. ...

Referencing Themes in a dll in WPF

Hi guys, I am using an opensource wpf TreeListView control. The control is a library project with a themes folder in it containing some xaml theme files. In my wpf project, I have got a reference to the control dll and I would like to know how to reference the dll themes in app.xaml. I tried doing something like this but it throws excep...

During drag drop, how to show a popup with text(or a cursor with text) that follows the mouse cursor in WPF

Hi, I need to show a popup to the user when he is dragging files or items onto my control. The popup basically informs him why dragging is disabled by giving him a message. I would like the popup to follow the mouse cursor whilst he is still in dragging mode. OR is there a way to change the mouse cursor while dragging and displaying a t...

Open WPF Popup on TextBox focus

Hi, I want to open a popup when the focus is on a text box Here is the code I wrote : <Window x:Class="Testpopup.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Grid> <StackPanel> <T...

WPF TabControl Templates + ItemContainerStyle

Hi All, I am attempting to create a Tab Control Style that basically looks like buttons at the top that are centered and content panel below that displays the tabitem content. I have am kind of new to templates but what I have so far works very well except one thing. I want to be able to set the default forground color for text element...