xaml

a 3D cone object in XAML

Hi All, I want to create a 3D cone object in XAML C#. Could you help me to do, please. Regards Can ...

WPF: ObjectDataProvider (with LINQ to XML) or XmlDataProvider---which do you prefer?

I've just read “How to perform WPF Data Binding using LINQ to XML” and this leads me to the question, ObjectDataProvider (with LINQ to XML) or XmlDataProvider---which do you prefer? Should I just fall in love with the XAML-based LINQ to XML approach or are there performance issues here? This is a snippet from the aforementioned article:...

What does the WPF star do (Width="100*")

What does exactly the star in size terms in WPF mean? ...

Need Mock XAML data at design time

I'm using a static array of objects defined in XAML as my ItemsSource on a list box. I use: ItemsSource="{Binding Source={StaticResource theSource}}". This works great at design time. However, I need to override this at run time so the list box will take it's items from a collection property on my view model. I exposed a Property ...

Animate Window Resize (Width and Height) C# WPF

Hi All, I'm looking for some help on animating window resize of an open window! Cant seem to figure this one out! I'm just using atm. this.Width = 500; Any help would be great! Thanks. ...

Styling multiple types of WPF controls

I have a stack panel with a few (different) items: <StackPanel ...> <TextBlock ... /> <CheckBox ... /> <CheckBox ... /> <Button ... /> </StackPanel> I would like to apply VerticalAlignment="Center" to all children of the StackPanel without having to add VerticalAlignent="Center" or Style=... to every single child. So, ...

WPF style basedon current

Is there a way to create a style that extends the current style, i.e. not a specific style? I have a WPF application where I create styles to set some properties like borders or validation. <Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}"> <Setter Property="Padding" Value="5,2,5,2"/> </Sty...

how to propagate a 3d object in C# ?

Hi All, I need to propagate a 3D object in XAML C#. For example, I want to produce a cone for X, Y and Z axes. So, 3 conical symbols that have a 3D different coordinates must be available . Could you explain me how this can be done in XAML C#. Thanks in advance. Ken Howard ...

to make an UCS icon in XAML C#

Hello, I want to make an UCS icon for the coordinate axes in XAML/C#. Could you help me, please. Regards Keneddy ...

TreeView, Overiding the double click mouse event WPF

Hi. I was wondering, what will be the best way to override the Tree View's mouse click? As you know when you double click a tree view parent, then the tree view expands and shows the children. If it doesn't have any children then it doesn't do anything. but if it is already expanded, it will the collapse. I want to take the tree view,...

WPF style causing loop

Why does the following XAML cause a stack overflow exception with some themes? <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="ExpressionLight.xaml"/> </ResourceDictionary.MergedDictionaries> <Style x:Key="BaseButtonStyle" TargetType...

How to directly access the UI thread from the BackgroundWorker thread in WPF?

I'm creating a backup utility in WPF and have a general question about threading: In the method backgroundWorker.DoWork(), the statement Message2.Text = "..." gives the error "The calling thread cannot access this object because a different thread owns it.". Is there no way for me to directly access the UI thread within backgroundWorke...

Why does a string INotifyPropertyChanged property update but not a List<string>?

In the following WPF application, when you click the button, why does TheTitle TextBlock update but FilesCopied ListBox not update? XAML: <Window x:Class="TestList3433.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300...

HierarchicalDataTemplate and HeaderedItemsControl with ControlTemplate fails to show nested data...

I can get this pattern to work with Menu and TreeView but I must be missing something when I make an attempt with HeaderedItemsControl: <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > <Page.Resources> ...

WPF XAML Style Gallery

WPFThemes is a good resource for WPF themes and styles. As of now they do not cover many controls like Window Popup Datagrid etc.. Is there any other resource to help developer in styling a WPF application? ...

Is there any way to bind a method to a DataTemplate of a ListBox?

The following example successfully shows the property Title in the ListBox, but is there a way to show method GetTitle() so that I don't have to turn all my methods into properties? e.g. neither of these seem to work: <TextBlock Text="{Binding GetTitle}"/> <TextBlock Text="{Binding GetTitle()}"/> XAML: <Window x:Class="TestBindMetho...

Why don't UI elements reflect their state in Button Click event handler?

In the following example, how can I get: the button to be "disabled-grey" the message to say "working..." while the work is being done, not after the work is done? XAML: <Window x:Class="TestIsEnabled8938.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/...

XAML binding doesn't seem to set if the property is initialized in the constructor

Hello, everybody! I've run into a problem with data-binding inside control template while the property is initialized inside the constructor. Here is the show-case (you can also download sample solution): CustomControl1.cs public class CustomControl1 : ContentControl { static CustomControl1() { DefaultStyleKeyProperty...

Xamly bind WPF Calendar to a date-range?

Is there a way to bind WPF calendar to 2 date fields as a date-range (i.e. start date and end-date) with xaml binding? ...

How to process multiple where clauses in a LINQ statement?

Thanks to those who answered my last question I got the code below to work which allows the developer to send multiple where clauses to a method which includes each of them in a LINQ statement. However, how can I get the inclusion of the where clauses to be dynamic? Instead of this: return customers .Where(whereClauses[0]) ...