wpf

OpacityMask not working with WPF WindowsFormsHost?

I'm trying to put a rounded border on a control which is hosted through a WindowsFormHost object. It seems like no matter what I set for OpacityMask, it has no effect on the rendering. Is there something I've missed? Here is the XAML code I am using. The child control is added at run-time. I've tried various combinations of masks, n...

wpf how to inscrib rectangle in elipese

Hi I have quite a big problem. I draw elipse using Path element in wpf. My ellipse looks like that <Path x:Key="MainPath" Fill="{StaticResource DefaultBrush}" Stretch="Fill" Grid.RowSpan="2" Data=" M453.5,140.5C453.5,217.81986 352.0925,280.5 227,280.5 101.9075,280.5 0.5,217.81986 0.5,140.5 0.5,63.180135 101.9075,0.5 227,0.5 352.0925,0.5...

Multi-Threading WPF with Accessors

I am trying to update a UI element from a different thread but I am clearly missing something with regards to the new WPF calls. In 3.5 winforms I did something like the following when updating my UI via a different thread: public string SummaryTitle { get { if (IsHandleCreated && InvokeRequired) { IAsyncResult...

Binding not works on DependencyProperty

I have a window which has a usercontrol in it . This usercontrol's RequestObject property bound to SearchArgumentObject property of ViewModel of the window. This is listing from my window class <Grid DataContext="{Binding SearchArgumentObject, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"> <guiLib:RegCardSearchForm x:Name="S...

Why my checkbox override does not work ? ( code attached )

I try to create 3 state button. This control will will change the image on each of those 3 state ( normal, pressed, mouseOver ). The images of each state will be define as a property from the c# code ==> that mean i will be able to re-use this code and change the properties of the image source. The Xaml: <CheckBox x:Class="StateButto...

WPF Save WebBrowser HTML

Does anyone (please) know how to do this? I thought that there would be an easy way to achieve this but can't find anything about saving the contents of WebBrowser HTML. ...

WPF DataTemplateColumn access DataTemplate and set ItemsSource

I know its strange what I am doing but I want this to work. I am going wrong somehwere I feel. I have a DataTemplate defined in my resources as follows : <UserControl.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="../ParameterEditorResourceDictionary.xaml"><...

Binding child datagrid to the parents list function

So I have the following xaml The parent list view is bound to collection programmatically All of the binding works great except for the datagrid doesn't populate. Is there an additional step I need to take or should I just cheat and bind it on the back end. <ListView.ItemTemplate> <DataTemplate> <Border Bor...

how to systematically solve binding issues.

I have been using data binding for several years with win forms, but now with more rich and full featured data binding in wpf I can easily do stuff that would have taken a lot of code in winforms. Lurking beneath the surface is an unsettling feeling that all of this is a little to automagic and that if I break something I may not be abl...

Visual Studio On/Off Control in Windows Forms

How can I add the the sleek On/Off control to a Windows Forms application? Or do I need to use WPF? Example Ignore the red highlighted area, look at the on/off controls (screenshot lifted from Visual Studio Power Productivity Tools). ...

GroupBox border is striking through the title in WPF

I have a wpf app with a dark background and I am using White Font color. For some reason on some computers that the program is installed, the white border strikes through the label. Has anyone else ever had this problem? How can I get around this? XAML Below: <GroupBox Header="Enter tester information" Margin="56,161,41,212" Name="g...

Getting XAML designer to show design in VS2010

I am starting to learn WPF and I grabbed the Family.Show project as a real-world example to help me learn. It's got a pretty good UI, and some cool animations in the main panel for the family tree -- I'd love to see how they did it. So I downloaded the source code (http://familyshow.codeplex.com/releases/view/23637#DownloadId=59428), o...

WPF Scroll View Delema

I've created a UserControl that contains a ScrollViewer panel that contains a data bounds ItemsControl. When I add this UserControl into a Grid's cell in the parent Window, the ScrollViewer expands to contain all of the items in the ItemsControl rather than constraining to the dimensions of the cell. Because of this, it won't scroll the...

WPF. Layout issue.

Hello, guys I have StackPanel. I need place there TextBlock with TextAlignment = TextAlignment.Center[Center of stackPanel] and button at right side with small margin. How can I achieve such layout with wpf. How can I add button to StackPanel, that my TextBlock doesn't move from center. ...

How can i change the default values of the Binding Option in WPF?

In my current project i'm using several textbox controls whose content is filled from objects which are coming from a database. The object uses validation to validate the correct insertion of the text. When i want to show a validation error (i.e. the text has to many characters) i have to add some binding options to the text property li...

Apply LayoutTransform to DataGridTextColumn

I've got a DataGrid containing some DataGridTextColumn and would like to apply a simple LayoutTransform to the cells, but not the header. Problem is, DataGridTextColumn does not offer LayoutTransform. I was able to apply LayoutTransformation to a DataGridTemplateColumn, but I lost a whole lot of functional and was unable to build it ba...

WPF bind to datagrid from template

hello, i'm new in wpf. I have a DataGrid form wpftoolkit and i need to show button in template only when row is selected and the record is not last(new record item) <dg:DataGrid AutoGenerateColumns="False" DockPanel.Dock="Top" ItemsSource="{Binding Source={StaticResource Entries}}" Name="dataGrid" ...

Resize main window of WPF application programmatically

My application is running on a touch-screen and it has a transparent main window, so only way to resize is using grip, but on the touch-screen it is quite hard to do. I wonder if there is a way to increase the size programmatically. I have tried using custom commands but the window increases only by a small amount. Here is the code for...

WPF CheckBox background color not visible in windows Vista

Hi, I have set the background property of a checkbox control to a color, in WPF. It appears OK when run on windows XP but appear as a border color in Vista. Anyone know the reason for this behavior and how to overcome? Thanks. ...

WPF custom View without Generic.xaml

I am trying to implement custom views that are specific to an application without any luck. Here is my problem: I need a custom view because I would like for the user to be able to switch views dynamically at runtime. I need a custom view (as opposed to only datatemplates) because the listview layout has to change as well as the Control ...