xaml

XAML design view broken in visual studio 2008 for silverlight 3?

...

XAML Conditional Compilation

Is there an easy way to use the same conditional compilation symbol that I'm using for my c# code, in my xaml files? ...

WPF Grid data binding

I have a grid with just 1 row. I would like the amount of columns to be determined by the data context of the grid. For instance, if I have a list of names exposed in an ObservableCollection property called 'Names' that return "Fred", "Joe", and "Anne", I would like three columns in the grid, each with a textbox bound to each name. ...

wpf usercontrol - click animation

I have created a wpf usercontrol with some complex XAML (converted from SVG). It's basically a fancy button. I would like to create an animation in the usercontrol's XAML to "shift" it's location by 4 pixels to the right and down, to simulate a click, and then have it pop back to its original location. To me, this sounds like the fir...

GUI test framework for XAML views/controls

I'm looking for a test framework that helps me test XAML views/controls. Not just to verify correct data binding but especially to test the appearance and behavior of more complex controls. Obviously this will usually result in manual tests. What I have in mind would look something like this: Write a normal unit test using whatever un...

How do you force a line break between two words in a XAML-declared Label?

Maybe I'm not using the right key words, but all my searches are coming up empty. How do you force a line break? I can tell you that none of the following work: <Label Content="Line&br;Break:" /> <Label Content="Line<br />Break:" /> <Label Content="Line Break:" /> <Label Content="Line\nBreak:" /> Can someone sh...

Problem with TreeView in SilverLight

Hi, I have the following class structure: class Organization { string Name; List<User> users; List<Organization> Children; } class User { string Name; } I cannot modify these classes. I need to display all the information about organizations and users in one TreeView control. I.e., organization nodes should contain su...

How to style a XAML window with a ResourceDictionary that exist in a DLL?

Hi I am trying to create a reusable XAML Window in a DLL. I have placed in the Themes folder a new ResourceDictionary (I even merged it in the Generic.xaml), but when I try to use its styles in the window, I get an error message that the style doesn't exist: <Window Style="{StaticResource ModalWindowStyle}" > <!-- I have also the f...

How do you remove the padding from within a Silverlight DataForm?

I’ve got a Silverlight 3 DataForm which is adding some odd padding to the DataTemplate. Using Silverlight Spy to inspect the XAML output, it looks like there’s a ContentPresenter with a margin of 12, 12, 6, 12 which then contains the contents of the DataTemplate. This means there's always padding in the form which is not ideal for my sit...

Databinding the color of a RadialGradient brush in silverlight 3

Hi, I am trying to databind the color of a RadialGradientBrush in silverlight 3 to a property, but just can't seem to get it to work. For example, in a sample test app all I have is <navigation:Page x:Class="SilverlightNavigator.HomePage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" x:Name="HomePageUC" x...

WPF Button content with '&' not accepting.

I am creating and with content 'Save & Add'. I write it in XAML, but the symbol '&' is not accepting. What is the reason for that. How can I do that? ...

How can I design individually the Border-Sides in XAML

How can I design the Border only Top, Left, Right or Bottom Side in XAMl? In CSS is this possible with Border-Top:... ...

How can I different design the text within TextBox (XAML)

How can I different design the text within the TextBox-Element in XAML Example: I need the first word normal fontweight and the second word bold... ...

how to call a window's Loaded event in WPF MVVM?

It is easy enough to create a command from my OnLoaded() event handler code, but how do I call it from the View? <window Loaded="onLoaded"> doesn't cut the cake anymore since it calls code in the xaml.cs. How would I create an ICommand equivalent? ...

XAMLParseException

hi, i get an exception which drives me crazy. There isn't a StackPanel in this XAML. (StackPanel was removed already) System.Windows.Markup.XamlParseException occurred Message=" Unable to cast object of type 'System.Windows.Controls.StackPanel' to type 'System.Windows.Controls.ListView'. Error at object 'System.Windows.Controls.Stac...

Disable XAML Preview

In Visual Studio 2008 when I open a XAML file from the project it displays the horizontal split with the preview on the top, and the XAML on the bottom. Most of the time our XAML won't render in the preview, so I just have to wait for it to try to render, and then close the preview. Is there a way to have it default to not showing th...

Dynamic Height and Width When Rendering XAML Buttons to PNG

I'm putting together a prototype to use XAML to create PNG buttons. The basic idea is that nice, gradient image buttons can be generated from localized strings instead of having them created by any sort of graphics dept. The most straightforward example I found actually was to build a C# assembly and call it from PHP. I converted it to...

Multiple Command Binding

Is it possible to bind the multiple commands to the button. I have a user control, which i am calling in my main application (parent application). I want to handle a click command on both the controls (the user control as well as on the main window). However i am only able to get one. Is there any way in which i can get this. Any hel...

Change content of ImageButton programatically (WPF)

I am using a ImageButton as <Button Width="80" Height="25" VerticalAlignment="Top" HorizontalAlignment="Right" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="0,0,1.5,0" Name...

Silverlight insert XAML inside other XAML

I am using WPF and Silverlight BookControls by Mitsu http://www.codeplex.com/wpfbookcontrol The WPF example alows that every page in the book to be a XAML file, but the Silverlight example dont. Is there a way load a XAML in every book page in the Silverlight example ? ...