xaml

Change Telerik Theme

How can I change the default telerik theme for a RadTreeView. I have multiple elements and the RadTreeView doesn't follow the color style of the rest of the elements. Say I want to change it to Vista. ...

Model Transperency

How can I achieve transparency on a model? ...

What's the easiest way to write a boolean animation?

Hello I have the following snippet: <StackPanel> <Popup> <TextBox ToolTip="Edit current date"/> </Popup> <Label "Current Date"/> </StackPanel> I want the popup to show when the StackPanel is clicked, and hidden when it (the Popup) loses focus. I was wondering what would be the shortest way to write this in xaml. ...

RelativeSource binding to a parent property of a ComboBox SelectedItem return object

Hey all, Given the data structure { Collection elements; String LocationName; } And a ComboBox that is bound to a collection of such items (described in the structure) with DisplayMemberPath set to LocationName, how do I bind a datagrid to the SelectedItem.Elements of said combo box in XAML? By my understanding the SelectedI...

Pass Parameters to an Image Binding

I have several menu items like this: <navigation:RadMenuItem Header="New Assignment"> <navigation:RadMenuItem.Icon> <Image Source="/Images/New_Assignment.jpeg" Width="20" Height="20" /> </navigation:RadMenuItem.Icon> </navigation:RadMenuItem> <navigation:RadMenuItem Header="New Course"> <navigation:RadMenuItem.Icon...

WPF - save a rendered page as a XAML file

In a WPF application, how can I save a dynamically rendered page as a new XAML file? ...

Do you prefer a Grid of ContentControl elements?

Today I am led to say for the greatest level of flexibility using a Grid of ContentControl elements is the way to go. Are there any caveats coming for choosing this strategy? (Note that, of course, I am not referring to the DataGrid or the GridView of a ListView.) ...

How to you transform these image togglebuttons into vector togglebuttons?

Hello, I have just implemented these ToggleButtons using ControlTemplates that set the Image content according to IsChecked stated. The images are made in Photoshop, but I want them as WPF vectors. The buttons look like these when IsChecked=False: And when IsChecked=True I just replace the Image with another PNG: I've designed th...

How to implement an ItemsControl3D which can use templates of Visual3D?

I'm looking for something like a ContainerUIElement3D which supports the ItemsSource property and an ItemTemplate property which I can use within a Viewport3D. My aim is to be able to write something like: <ItemsControl3D ItemsSource="{Binding Path=MyItems}"> <ItemsControl3D.ItemTemplate> <DataTemplate3D> ...

Converting EPS to Xaml

I have bunch of EPS vector files that I want to convert to Xaml (WPF version, not Silverlight). What's the best tool for the job (Preferably a free one)? ...

Setting the IndependentRangeAxis in XAML for chart with multiple series and two Y axis

In my chart I have defined three axes, one X and two Y. <Axis x:Name="PercentageAxis" Orientation="Y" [...] /> <Axis x:Name="NormalAxis" Orientation="Y"[...] /> <Axis [...] /> And several series. <LineSeries .... /> <LineSeries .... /> <LineSeries .... /> <LineSeries .... /> I would like to be able to assign a series to a specific...

SharePoint workflow to XAML ?

Hello geeks, I have one workflow deployed on SharePoint server. Now can I reverse engineer that and create (workflow)XAML out of it? if yes how? ...

WPF: Binding the height of a component to another's.

I have, in a window, a Grid that contains a RadioButton, a TexBox and a Button, each in column 0, 1, 2, respectively. They all have their heights set to auto. Then, in another part of the window, I have another grid with a Label, a TextBox and a Button, in columns 0, 1, and 2. Heights are also set to auto. The problem I have is that th...

VS2008 XAML code formatter

In my team, the code style in .xaml files are currently not very consistent. We looked over the Visual Studio auto formatter to make it format the code into something we like. However, for one option we lack an extra condition. The options Im talking about are found under Tools -> Options -> Text Editor -> XAML -> Formatting. We want ea...

WPF: How to bind to different objects?

I have a ListBox containing CheckBoxes. Xaml looks like this: <ListBox x:Name="lbContactTypes"> <ListBox.ItemTemplate> <HierarchicalDataTemplate> <CheckBox Content="{Binding Path=Description}" IsChecked="{Binding Path=ContactTypes, Converter={x:Static Classes:ListContainsConverter.Instance}, ConverterParameter=1}...

Create Properties or DependencyProperties that have Code Completion in XAML

Hi, I am trying to create DependencyProperties that have a nice drop down code completion when using them in the XAML-editor in Visual Studio. Many default SilverLight framework properties have such completion, e.g., Background or BorderBrush. Also, Boolean Properties show the True/False selection in the XAML-editor. The same holds true...

WPF: Is there a way to get original values in ConvertBack method of MultiValueConverter?

I've written a MultiValueConverter which checks if a given list contains a given value and returns true if it does. I use it for binding to custom checkbox list. Now I'd like to write ConvertBack method so that if checkbox was checked, original value would be sent to the model. Is there a way to access values in ConvertBack method? XAML...

How to discrete animate GridLength from "Auto" to "*"?

I need to animate this property using a Storyboard. Is writing your own animation is a best choice? ...

How to reuse this in WPF?

It should look like this: I don't care about reusing it in other applications that need somewhat different looks. It's just for display Content needs to wrap, maximum 3 lines. I'm trying to implement it as a derived class of UserControl with XAML defining the visual elements, but I'm not sure if that's the best option. So how wou...

Recursively retrieving all items in a TreeViewItem

I have a RadTreeView (Telerik's version of a TreeView) that has the following hierarchical order: <navigation:RadTreeView ImagesBaseDir="/Images/" x:Name="rtvLibrary" Margin="8" Grid.Row="0"> <navigation:RadTreeViewItem DefaultImageSrc="Home.png" Header="Home" IsExpanded="True"> <navigation:RadTreeViewItem De...