xaml

XML to XAML conversion

Hi, We have about 1400 xml files which we use to store data around the look and feel of the controls used to load dynamically in winform applications. We want to convert these XML to XAML. Is there any easy way to get this done? ...

Simple grid layout question

I can't believe I'm back to this after working with WPF for 3 months :) Consider very common setup: How do I configure the rowheights so that the top and bottom rows (menu bar and status bar) size to fit the height of their content, and the middle row (main content), fills the remaining available space in the program? I can't fix the ...

using context menu in silverlight 3

Hi all I am new in silverlight. I want to use context menu in treeview item in my silverlight 3 application . I have searched in the net regarding this I have found my custom application for this but I am not getting them .How to use context menu, how to add rightclick event for using context menu . Thanks in addvance ...

Best practices for dimensioning control panels in WPF

Hello: I defined a Window in WPF, into this one I put a "stack panel" and inside this panel I put a "tab control" and some "button controls". When executing the program, I would like that when I have to resize the window using the mouse, the stack panel and all controls inside it can also be resized automatically and proportionally to ...

Databinding combobox selected item to settings

I store user specified settings using application settings properties and databinding. It has been working fine, until i want user selected to font for combobox. Databinding between user settings and combobox not working. I want to store font family name. App.XML <Application.Resources> <ResourceDictionary> <properties:Setti...

Nested AccordionItem. Inner AccordionItem do not expand.

In Silverlight an AccordionItem is inside another one . When the inner one is selected, it can not expand its parent more which is already expanded to show its own content. I tried to get around it by templating but I was unlucky. Does any one has a solution for it [prefer a solution without code]? <UserControl xmlns="http://schemas....

Good Silverlight Custom ItemsControl Tutorial

I'm afraid my Google-Foo is failing me again today. I'm trying to find a good tutorial on creating custom ItemsControls in Silverlight (though I imgaine a WPF version might work as well). I'm trying to create a custom ItemsControl that will be something of a virtualized ListBox. What I'm trying to accomplish isn't really similar enoug...

create board for game with events support in WPF

How can I create board for simple game, looks like for chess,but user could dynamically change number of column and rows? In cells I could insert symbol of pawn, like small image or just ellipse or rectangle with fill. This board should have possibility add and remove pawn from cells and move pown from one cell to another. My first idea...

Problem with binding from style

I have this block of xaml and I made a ViewModel which contains a property called MyBrush. I would like to set the grid background to that property but this block doesn't work. Could you tell me how can I do that? <Style x:Key="myKey" TargetType="myType"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetTyp...

Typographic entities in WPF FlowDocument

Is it a way to add to FlowDocument content specific typographic symbols (dashes, greek symbols, etc)? ...

Setting an XAML Window always on top (but no TopMost property)

I am developing an application based on OptiTrack SDK (from NaturalPoint). I need to run the application window as "Always on Top". The window is designed in XAML and is controled in the class "CameraView" but it does not seem to include a "TopMost" property or equivalent. Attached are the code of "CameraView.xaml.cs" and the code of "Ca...

Binding to save value of a text input to Settings.settings registry in XAML?

Let's say we have a text field named TXTBLAH and a setting named SETTINGBLAH Is there anyway to write in XAML markup that whenever the text field BLAH gets updated to write that to the registry, and also when the form loads is there a XAML binding to restore it? ...

Using image resource in XAML markup?

I'm trying to add little icons to my tabs in WPF but having trouble with how to set up the binding. <TabItem.Header> <StackPanel Orientation="Horizontal"> <Image Source="{Binding Source=prop:Resources.eye}" /> <Label VerticalAlignment="Center">Header</Label> </StackPanel> </TabItem.Header> The xmlns:prop is...

Xaml parse exception is thrown when i define a duplex contract

Hi! I've got a WPF application containing a WCF service. The Xaml code is pretty simple: <Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Server" Height="308" Width="560" > <Grid>...

Best way for programmers to edit XAML

I was wondering how programmers chose to edit XAML. Most of the programmers I speak to seem to edit the raw XML, but that seems nuts to me since it is such a natural thing for a more visual editor (of course you often have to get down to the raw code ultimately, but isn't there a better way to lay out a grid, or edit a template, or add n...

Settings aren't saving in WPF?

I'm using the registry Settings.settings thingymabob I'm doing the following in my XAML: <TextBox x:Name="textBoxUsername" Text="{Binding Source={x:Static prop:Settings.Default}, Path=Username, Mode=TwoWay}"></TextBox> This is loading the settings fine. Now in my Window's Closing event I have the follow...

Is there any resourcedictionary navigation on visual studio 2008

I need resource dictionary navigation tool like Expression Blend. Because my xaml file is too long and hard to navigate to style. Is there any resource dictionary navigation add-on on visual studio 2008? How to easy navigate to resource dictionary ...

WPF Combobox binding Question

I have a 2 Table. Product ProductName CategoryID Category ID CategoryName I'm filling combobox to table named 'category'. Code Product currentProduct=datacontext.products.FirstOrDefault(); this.datacontext=currentProduct; combobox1.Itemssource=datacontext.categories; XAML <Textbox Text="{Binding Path=ProductName}"></Textbox> ...

WPF Theming and dynamic controls

Hello, I am trying to add control to ContentPresenter on then run, but control I've added does not apply theme. Theres is code with reference to theme in xaml file: <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Resources/PocGraphDataTemplates.xaml" /> </ResourceDictionary.MergedDictio...

WPF binding to current class property

Hello, I have a problem that i cant solve :( I have a user control (xaml file and cs file) in xaml it's like: <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxm...