xaml

Is WPF & SilverLight Design worth learning

Hi, For a developpeur who as to do a project with WPF or Silverlight (xaml code), is it trial to learn some design (basics) and to handle blend? Beacause in France there isn't much blend professional (compare to photoshop users) and the price/day of a blend designer is very high. What I am sure is there i ain't no artist, but it could...

Silverlight 3: sizing model / 100% size

Sorry for asking an complete n00b question, but I've tried everything I can think of and nothing has worked. Google hasn't been too useful, all the results are from ancient versions of Silverlight :( The problem: I've got an Silverlight User Control. The layout root is an Grid. The grid is defined so: <Grid.ColumnDefinitions> <C...

Why image with transparent background not visible in Silverlight?

I have created an image to use as a ruler. It has black lines and text on a transparent background and is in PNG format. After adding it to my XAML I was surprised to find that the image was not visible, and even more surprised to find it was visible in Blend when I loaded the XAML file there. What might cause an image to be invisible w...

WPF- How Can I Show a Cropped Region of an ImageSource in an <Image> Control?

WPF- How can I show a cropped region of an ImageSource in an control? I have an ImageSource of a vairable size in pixels. I have a caculated crop rectangle, indicating how much of the image we are actually going to use. I don't want to edit the image data directly, but I want my <Image> control to display only the cropped region of t...

How to have Underline/Border stretch all the way across container

Here is the code that I currently have to create underlined header text in WPF. There has got to be an easier method then using tables. <Grid> <FlowDocumentScrollViewer> <FlowDocument> <Table> <Table.Columns> <TableColumn Width="Auto"/> </Table.Columns> <TableRowGroup> <TableRow> <TableCell> ...

Visual Studio 2008 hangs with XAML

I know this is not a programming question per-se, but it's still related in a way. Anyway, I've had this problem for months now, and right now I decided to start searching on Google, but I can't find anything. It doesn't only hang for a few seconds, each time this happens, I have to restart visual studio. @John Saunders: Thanks for poin...

Strongly typed databinding in WPF/Silverlight/XAML?

One of my biggest pet peeves with how databinding works with XAML is that there's no option to strongly type your databindings. In other words, in C#, if you want to access a property on an object that doesn't exist, you won't get any help from Intellisense, and if you insist on ignoring Intellisense, the compiler will gripe at you and ...

Why will my modules not fill the full DockPanel in my Shell.xaml?

In my Shell.xaml I want two modules to each take up half the height and be expandable. Why is the first module being cut off? Shell: <Window x:Class="HelloWorld.Desktop.Shell" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:cal="http://www.code...

XAML StringFormat to format a Double value

I want to format my slider value to be 00:00 format. The below code worked for me, but what I wanted is 00:00 format. I am looking for a total XAML solution. I know that I can write a converter for this easily but wonder if there are any StringFormat way to make it. Text="{Binding Value, ElementName=slider,StringFormat=\{0:00.00\}}" ...

WPF Popup Button Question

Hi, In WPF I want to have a button that when clicked, it either opens or closes a Popup depending on whether or not it's already open (Close it if it's open, Open it if it's closed), and I want to do this purely in XAML. Is this possible? Thanks, Roy ...

Silverlight popup ActualSize

In Silverlight 3, I am trying to create a pop up menu for navigation. I am using a HyperlinkButton as a trigger, which when moused over displays a Popup containing more HyperlinkButtons. The root node is right aligned and I want the sub-menu to appear to the left. My problem is that I am trying to position the popup using its ActualWi...

WPF - Dynamic Form with events, database interaction.

Friends, I have a WPF requirement... Just like we create the HTML page, someone said we can also create the XAML pages, call them into the form (on Windows Form). My idea is to create a dynamic form at run-time. This form should supports the XAML based controls rendering, events I searched a lot but I did not find anything ready. I my...

Application-level Resources in a Different Assembly

This question involves the Visual Studio (2008) WPF Designer's apparent inability to handle the usage of resources located at the App.xaml level if the App.xaml is in a separate assembly from the view. To simplify the explanation of the problem I have created a test application. This application has two assemblies: View and Start. The ...

Conditional FrameworkElements depending on DataContext

In my M-V-VM application I have to show the user's avatar. The image is provided in a property of type ImageSource the ViewModel object. So that's what I have currently: <Image Source="{Binding Path=UserAvatar}"/> However, some users may not have an avatar configured, so UserAvatar is null. In that case I want to show a default avatar...

How to Call XAML Code in C# body?

I have animation written in XAML. And I want to call this animation during C# body. ...

How can I bind the result from methode in a static class with parameters (only XAML)

I have a methode in a static class and this expected two parameters and return a string. Now should I like from my View (without ViewModel) bind this result. Is this possible? Pseudocode: xmlns:lang="clr-namespace:LanguageModule;assembly=LanguageModule" <TextBlock Text="{x:Static lang:Translate[firstParameter, secondParameter]}"/> ...

adding clickable text to DrawingGroup

Have (finally) created a baseball diamond control using xaml. (code below). I now need the ability to create "clickable" text at the major positions (1B, 2B, SS, 3B, etc). The text also needs to be rotated (since I draw this entire control in the corner and then rotate it at the end. Can someone assist in adding text to my DrawingGrou...

Extending/overriding a style in a resource dictionary

I have a BaseSkin and multiple UserSkins in a separate dll from my WPF application. Depending on who is using the application, the base skin and one of the user skins will be merged into a resource dictionary and loaded for the application to use. What I'm aiming for is the ability to specify a style in a BaseSkin file, and then on a s...

How can I disable the Design-Mode in VisualStudio options

How can I use only the XAML-Code-View without Visual Studio load the Design-Mode? I need every Time disable the designMode, i cant find this in my options... ...

Manually parse string as XAML Attribute

How does the XAML Parser convert the string "Red" in Foreground="Red" to a SolidColorBrush? Allthough I know the Types have System.ComponentModel.TypeConverter defined, I doupt that the WPF XAML parser acutally always uses those to convert the string to the brush. Are there any XAML APIs apart from XamlReader.Load (wich wants a valid xml...