wpf-controls

WPF Dynamic Layout with ItemsControl and Grid

I am creating a WPF form. One of the requirements is that it have a sector-based layout so that a control can be explicitly placed in one of the sectors/cells. I have created a tic-tac-toe example below to convey my problem: There are two types and one base type: public class XMoveViewModel : MoveViewModel { } public class OMoveViewMo...

Unable to find static resource in runtime even while designer can see it

So i have this markup: WizardPageTpl.xaml <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Werp.MigrationHelper"> <Style TargetType="{x:Type UserControl}" x:Key="WizardPageControl" x:Name="WizardPageContro...

WPF: Restyling a window?

Hi there, does anyone know if its possible to restyle a window in wpf. Or even better any tutorials or samples? Basically i would like to change the minimize and maximize buttons - oh and the close button to be slightly bigger.... I have expression blend.... Is this possible? I saw some samples in infragistics sample apps which have...

How to select one row of data from a telerik WPF GridView control

Hello I have been playing around with the WPF GridView control (DesktopUI not Silverlight) and I need to be able to select a specific row and only have the data for that row returned for viewing within a new control such as a list box. In addition, once the data from a row has been selected the ability to select or add additional data...

Taking out FilterRow from XCeed DataGrid control

Is it possible to pull out filter row from XCeed DataGrid control to some other place like group box ? If possible, how ? Any pointers will be appreciated. Please consider scenario given below where when I click on Filter button, Product Name column will be filtered according to filter query. For doing this scenario I need to take out F...

trouble animating GridLengths with star-values

Hi all. I'm using a third-party GridLengthAnimation class which is built to animate just like a DoubleAnimation class. I've used it many times before and it has never failed me - until now. I am trying to use it to expand/collapse part of my form based on the user checking a +/- checkbox to expand/collapse it. You know the drill. Th...

Splitting up/merging windows in WPF

I'm new to WPF but I need to implement following functionality: I have a window that contains one Grid (might be changed to stack panel or something else). In that Grid I have 2 columns, each of them contains another Grid. Lets call them gridFirst and gridSecond. There is also GridSplitter in first column allowing to resize the columns....

DoubleAnimation in ScaleTransform

I'm trying, as an exhibition, to use a DoubleAnimation on the ScaleX and ScaleY properties of a ScaleTransform. I have a rectangle (144x144) which I want to make rectangular over five seconds. My XAML: <Window x:Class="ScaleTransformTest.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http:/...

WPF - Only want one expander open at a time in grouped Listbox

I have a UserControl with a templated grouped listbox with expanders and only want one expander open at any time. I have browsed through the site but haven't found anything except binding the IsExpanded to IsSelected which isn't quite what I want. I am trying to put some code in the Expanded event that would loop through Expanders and c...

What is a good alternative to the WPF WebBrowser Control?

I have an MDI WPF app that I need to add web content to. At first, great it looks like I have 2 options built into the framework the Frame control and the WebBrowser control. Given that this is an MDI app it doesn't take long to discover that neither of these will work. The WPF WebBrowser control wraps up the IE WebBrowser ActiveX Con...

controls layout WPF

i have a LOB application with 30 fields to put in a form. I found it very painful to put them in the window with a grid. is there a productive way to build entry forms in WPF . Thanks John ...

WPF: Custom control that binds its content to a label

I want to write a custom control that's used like this: <HorizontalTick>Some string</HorizontalTick> It should render like this: -- Some string ------------------------------------------- Here's my code: <UserControl x:Class="WeatherDownloadDisplay.View.HorizontalTick" xmlns="http://schemas.microsoft.com/winfx/2006/xam...

WPF Browser is there, but invisible.

I am attempting to use the Browser control in a very simple WPF application, and it appears that while the browser is loading the page that I requested (I can mouseover images and see the ALT tags), I can't actually see anything else: Here is the XAML for the app: <Window x:Class="SmokeyBox2.MainWindow" xmlns="http://schemas.m...

In wpf how to handle a event raised by a button inside user control in the page which uses that user control

Hi I am using MVVM architecture. I had created a user control which contains a button control. I want the click event of the button control to be captured in page which uses this user control. How to do this? Plase help :) ...

Frustrated With Wpf DataGrid

Hello Experts, I have a tabcontrol and I place datagrid inside a tabcontrol... But I could not focus that Datagrid at the load event ... Focus means I couldn't navigate through keyboard into it... I'm getting this problem only inside of the tab control otherwise it works fine... My xaml code as follws... ...

Is it possible for a WPF control to have an ActualWidth and ActualHeight if it has never been rendered?

I need a Viewport3D for the sole purpose of doing geometric calculations using Petzold.Media3D.ViewportInfo. I would prefer not to have to place it in a Window or otherwise render it. I'm attempting to accomplish this by instantiating a Viewport3D and setting a few properties using the following C# method: private Viewport3D CreateView...

Frustrated With Wpf DataGrid

Hello Experts, I have a tabcontrol and I place datagrid inside a tabcontrol... But I could not focus that Datagrid at the load event ... Focus means I couldn't navigate through keyboard into it... I'm getting this problem only inside of the tab control otherwise it works fine...my sample project link as follows.. http://cid-0255...

WindowStatupLocation = CenterScreen is not working correctly in WPF

In the properties for the parent window I set WindowStatupLocation=CenterScreen In the properties for the Child window I set WindowStatupLocation=CenterOwner on the button click in the parent window if i show child window, the child window position is not center owner. Is this is a bug in WPF or I am doing something wrong? ...

Get a button in itemscontrol and add eventhandler to its click event

I have a custom control shows a customer info with an itemscontrol shows this customer's invoices. within the itemscontrol, I have button, in my code behind I want to wire the button's click event to my host window, but do now know how. //public event RoutedEventHandler ViewDetailClick; public static readonly RoutedEvent Butt...

Visibility.Collapse does not work in WPF

Visibility.Collapse doesnt work in my case. below is the XAML. If i try to hide the lblCountry and cmbCountry a white space is shown between zip and practice fields. There is no option to hide an entire row of a Grid. <Grid> <Canvas Name="canDemographic" > </Canvas> <Grid HorizontalAlignment="Center" VerticalAlignmen...