xaml

How to make ScrollViewer automatic

I tried to place a TextBlock inside a ScrollViewer, and the scroll bar shows up correctly, but I cannot seem to make it automatically scroll down when the Text property of the TextBlock is updated. Here's the relevant part of the XAML: <ScrollViewer> <TextBlock FontFamily="Consolas" Text="{Binding Current.Current.Discussion}" ...

Is there a way to define XAML elements as non-printable?

I have chunks of XAML displayed on my screen that I make printable with a print button inside that chunk, something like this: <Border DockPanel.Dock="Top" x:Name="PrintableArea"> <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom"> <ContentControl Background="Green" x:Name="ManageButt...

Is there an easy/built-in way to get an exact copy (clone) of a XAML element?

I need to make areas of XAML printable and so have make this button handler: private void Button_Click_Print(object sender, RoutedEventArgs e) { Customer.PrintReport(PrintableArea); } And in PrintReport I pack the frameworkelement into other elements in order to print it in a slightly different way than it is on the screen, like t...

WPF: Format Value in XAML with Decimal Seperator?

I have a little problem formatting double values in my XAML code. double price = 10300.455; This number should be displayed as 10,300.45 on US systems and as 10.300,45 on german systems. So far I managed to limit the numbers with the following Binding="{Binding price, StringFormat=F2}" But the result is 10300.45 and that is not wh...

XAML property to start a storyboard animation on load

Well, As the title suggest: I have a storyboard and I ant it's animation to start without the intervention of code. The reason for this requirement is that I am targeting Silverlight Embedded and I am too lazy right now to recompile my application as well. And, coming to think of it, it will be easier to change the animation only in th...

Jquery/Xpath for XAML

Is there project that could have like '$' shortcut, to use css-like or xpath possibility. Especially with dynamic keyword. ...

C# WPF - Global ScrollViewer Mode

I have made some custom attached properties that enable me to create a "pop out" effect on any control. It animates the width and/or height when a boolean DependencyProperty is toggled. Is there a good way to set all ScrollViewer's scrollbar visibility inside the control to hidden during this effect? You can see some ugly scrollbars a...

Missing Array element in UserControl XAML?

This is actually two questions in one: First, when you write your XAML and Intellisense fails to recognize the type you want to use (in my case, Array), what steps do you go through to figure out what's going on? I initially look over my XML namespaces to make sure that everything looks like it's in order. If it's a CLR type (not one ...

XAML, similar to float in HTML?

Image and Text, "float" and "clear" in HTML, gives possibility to build Text flow. How to do this in XAML? With a sample if possible. ...

Silverlight - how to auto begin a Storyboard inside a <ListBox.ItemTemplate>

I'm trying to display a list of bound data in a then get a Canvas to animate behind each row. I'm having trouble getting a Storyboard to Begin when I place it inside a template. Here is an example of the XAML I have so far: <ListBox x:Name="MyListBox" Background="Transparent" Foreground="White" Height="200" Width="400" BorderThic...

XmlParseException occuring in PresentationFramework for deploys only

I am getting the following exception when I deploy my WPF app to another user's machine: An unhandled exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll However, the WPF app runs fine when I open it. The app crashes at StartUp with this message. I've double-checked to make sure ...

ProgressBar clips the very top of value

I'm having a slight problem with reskinning a ProgressBar in WPF. Specifically, no matter what I do, it seems to clip the inner indicator at about 99%. I've tried all sorts of things, from clipping to OpacityMask, but I can't seem to stop the top from cutting off. Any ideas what's going on here? Code: <Style x:Key="BarrelStyle" ...

WPF binding in codebehind fails for transformations

Displaying a rectangle and binding Width, Height, Angle to a view model class works as I expect in XAML <Rectangle RenderTransformOrigin="0.5,0.5" Fill="Black" Width="{Binding Path=Width, Mode=TwoWay}" Height="{Binding Path=Height, Mode=TwoWay}"> <Rectangle.RenderTransform> <RotateTransform Angle="{Binding Path=Angle, ...

String animation in WPF?

How do I change the Content property of say a Button? Maybe with StringAnimationUsingKeyFrames? ...

What's wrong with my XAML?

I'm trying to get a simple data grid working under WPF, and I have no idea why it's not working. Here is the XAML - <Window x:Class="WpfApplication2.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="333" Width="592"> <...

Create ToolTip on Silverlight DataGridTextColumn that is different from the bound cell contents

I have a DataGridTextColumn in a Silverlight 4 DataGrid and I want to set a ToolTip value on the column that is different from the bound value. I know I can do this with a templated column quite easily - but it adds a huge amount of extra XAML and makes it cumbersome to read and maintain. This works, but is a lot of extra code - especi...

What features of WPF are excluded in Silverlight 3 ?

Hi, What WPF features were removed from Silverlight 3 ? I have found resources on graphing algorithms in WPF and am wondering how much of that I can transfer to a Silverlight application. Thanks, Scott ...

WPF ItemsControl IsMouseOver not working as expected.

I have the following code in the Window.Resources of a WPF window. What it is basically doing is creating an item that represents a grid with a label positioned on the left and a button on the right. When I mouse over the label or the button the row changes color as expected but I want it to also change color if the mouse is over any o...

Silverlight: Define a custom ControlTemplate in C# instead of XAML

I believe I'm using Silverlight 3.0... I just downloaded it this week. Assuming the charting namespace references the System.Windows.Controls.DataVisualization assembly in the Silverlight Toolkit, please help me create the DataPointStyle using C#, as it's expressed in XAML below: <charting:Chart Title="Simple Column Annotations - B...

how to get base uri of referencing xaml in a custom control

I have an custom control, which has an Image element with its Source property exposed to user, like this <ControlTemplate> <Image x:Name="PART_Image" Source="{Binding ImageUri, RelativeSource={RelativeSource TemplatedParent}}"/> </ControlTemplate> where ImageUri is an property in the control class, like this public Uri ImageUri {...