xaml

How to animate "typing" text in SketchFlow?

In Microsoft's Expression Blend 3 SketchFlow application. How would you go about animating the typing of text, ideally in staged character by character fashion. As if the user is typing it. An associated flashing cursor would make it perfect, but that's far into the realm of "nice to have". The keyframe animation system, does not all...

Bind page title to a text block in a style

OK, I have defined a style for Navigation Window. I have successfully styled Navigation buttons and even added page breadcrumbs to the Navigation menu. What I want is to add Page title next to the breadcrumbs: Style x:Key="{x:Type NavigationWindow}" TargetType="NavigationWindow"> <Setter Property="SnapsToDevicePixels" Value="true"/>...

How to catch mouse left down if data template has a transparent background?

Hi, My DataTemplate looks like this: <DataTemplate x:Key="ItemTemplate"> <StackPanel MouseLeftButtonDown="StackPanel_MouseLeftButtonDown"> However I can't catch mouse left button down. If I set the background of the template to some color, it is ok. How do I create a transparent DataTemplate and catch the MouseLefButtonDown event? ...

WPF Binding to method of a collection element

Im searching for the best practice (or any working solution) for the following scenario: I have an Employee class: public class Employee { public string DisplayName { get; set; } // It is important that this method has a parameter public string GetSomething(string param) { return param + DisplayName; } } I have a...

WPF Style to all control of one UserControl

Hello, Is there a way to apply a style to all controls of the same type in one user control dynamically, without applying in all controls of my application and without go to the control and set the style manually? EDIT The problem is that in my ResorceDictionary I have 2 styles, with the x:Key set <Style x:Key="ScrollBar_White" TargetT...

How can I escape a single quote in a XAML markup extension property literal?

I have a value converter that formats numbers (I can't use SP1 yet unfortunately). It works fine until it gets a percentage. Here's an example: <TextBlock Text="{Binding Path=PercentageComplete, Converter={StaticResource NumberFormatter}, ConverterParameter='0.00 %'}" /> Unfortunat...

Combo with 2D borders on XAML

I am working with XAML. How can I add a combo box with flat borders (Not 3D)? ...

the property 'Content' is set more than once

I am having the following XAML code, which throws error following error pointing to line# 16. the property 'Content' is set more than once Any thoughts? 1 <Grid x:Name="LayoutRoot" Width="970" Height="460" Background="White"> 2 <Grid.RowDefinitions> 3 <RowDefinition Height="*"/> 4 <RowDefinition ...

How get this xaml to work from app.xaml

I made this UpButton.xaml file by converting it from an .ai-file that our graphics guys made but i just can't get it to work. I was thinking of making this some sort of template/style for buttons, but our buttons are made up from rectangles and not the button object. I've been fiddling with this since last Thursday, googled and tried ev...

How to set property of a control based on the other control's property in wpf

I have a scenario where based on the textbox's text value I have to disable and enable the button say, for TextBox.Text="abc" or "cdf" the button should be disabled and for other values it should be enabled. this has to be written only in Xaml. Thanks In Advance ...

How to combine imported and local resources in WPF user control

Hi I'm writing several WPF user controls that need both shared and individual resources. I have figured out the syntax for loading resources from a separate resource file: <UserControl.Resources> <ResourceDictionary Source="ViewResources.xaml" /> </UserControl.Resources> However, when I do this, I cannot also add resources local...

How to set default XAML view in Visual Studio 2008

In Visual Studio 2008, when you add a new XAML window to a WPF Application Project, the default view you get is "split view" where the visual designer and the XAML code are shown one above the other in the same document. I prefer an alternative view which you can get by double-clicking on either the Design or XAML tabs. The visual desig...

Pack Notation in WPF

Hello, I have a question about pack notation. I'm trying to access a png image file within a XAML page from another resource assembly. Let's say the Resource Assembly (which is outside of the local assembly that my xaml file is in), is ResourceAssembly.Common.Resources and that my image is in ResourceAssembly.Common.Resources/Images/im...

Is there anything like jquery for WPF/XAML?

As the title says: Is there anything that is for XAML what jquery is for HTML? If not, would it be possible to create such a framework? ...

Load event for Grid.

I am trying to initialize my controls in Silverlight. I am looking for something similar to Form_Load event, which gets triggered when the form loads first time. The Loaded event in Silverlight gets called quite early, even before the control gets displayed in UI. I want to intialize prior to the UI rendering of the control the first ti...

Vertical TextBlock filling verical space

I want to create a TextBlock (or some other element with text in it for display only) that is vertical (-90 transform angle), but I want that element to fill up the vertical space it is contained in, but have a defined horizontal amount (I'm using vertical and horizontal terms instead of height and width since it's swapped when I have th...

Xaml: Bind to a single child in a collection

I have a class like this: public class Contest { List<ContestTeam> Teams { get; set; } } public class ContestTeam { int TeamId { get; set; } int FinalScore { get; set; } } And my view model looks like this: public class ScheduleViewModel { int CurrentTeamId { get; } List<Contest> Schedule { get; } } My Xaml loo...

Maintaining default visual properties with ControlTemplate

In order to apply a triggered animation to all ToolTips in my app, I'm using a ControlTemplate. However, when using a ControlTemplate the ToolTip loses all of its default visual properties as defined, I believe, by the theme. How can I retain all properties except for those that I override? Using the following code <ToolTip Opacity="...

XAML - Binding to DataContext and using converter?

To bind to the current DataContext in XAML you can use: <TextBlock Text="{Binding}" /> How do you do this using a converter in the mix? The following works when you have a property on the path: <TextBlock Text="{Binding MyProperty,Converter={StaticResource converter}}" /> But I dont want to do that; I just want to Bind to the datac...

How to bind to a property of the ViewModel from within a GridView

I'm using the MVVM design pattern, and the DataContext of my View is set to a ViewModel. In my View, I have a ListView/GridView with ItemsSource bound to a DataTable. One of the GridViewColumns has a CellTemplate that presents a Button. I want the IsEnabled property of the button to be bound to the SelectButtonsEnabled property of my Vi...