xaml

WPF: Launch ModalDialog control from within XAML ?

Hello, I'm building WPF client application. I'm following MVC pattern. The project solution has many items, so I created „Views“ and „Controllers“ separate assemblies. „Views“ assembly references „Controllers“. Problem: I need to load ShowModalDialog user control from withing controller instance which has no reference to View d...

WPF ListView loaded via binding with XmlDataProvider and I want to resize columns after the items are created.

Here is my XAML: <Window x:Class="Application.SeeProductVersions" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Application.ApplicationData" Title="Product Versions" Height="300" Width="640" Loaded="Window_Loaded...

Creating a Scrollable StackPanel Control

How would I create a control like the example at this site as a User Control? So, instead of doing this: <ScrollViewer> <StackPanel> <!– Content –> </StackPanel> </ScrollViewer> I could do this: <ScrollableStackPanel> <!– Content –> </ScrollableStackPanel> ...

XAML Without WPF - Animations

Hi! I am trying to use XAML completely outside WPF, in particular inside an XNA application. So far, I have managed (quite easily, I am surprised to admit) to load some data inside my XNA application from a XAML file. The problems start when I decided that I wanted to animate one of the properties of my class...Nothing happens :( Here i...

How to Debug XAML Parsing Errors in Silverlight?

I run into the following issue semi-regularly: I make changes to XAML or some resources used by it and when I go to load up the Silverlight project in debug mode it only gets as far as the spinning Silverlight-loading animation. I've tried attaching the VS08 debugger to the process but it doesn't do anything at this point (works fine on...

Silverlight 3 Chart Usercontrol, need to change/set legend title

I have a chart in a user control. As I want to use multiple charts in the app, I need to set stuff like title of a series for each instance of the user control. It works fine so far, but I'm not able to bind a variable (e.g. seriesTitle) to a target in the user controls xaml. Please see following code: Using the user control in MainPa...

Small balloon/box appear near nofityicon

I once have noticied when my Adobe Reader was updating, I saw a small balloon like it always has been. But then I wondered how I could make one of my own balloon/box/border things near my notifyicon. In XAML, I need a small ballon/box/border to appear near a notifyicon. ...

Silverlight Xaml: Location indicator with animated ellipses.

I have a map. When i query it takes me to that point or location. I would like a location indicator that shows at that location ellipses in form of a wave motion but with thier strokes/bounderies showing. Like in this image:http://i50.tinypic.com/2guji1k.jpg I picked up this xaml from somewhere but it animates using the gradientbrush. A...

Replace contents WPF grid control by grid in other XAML file

Hello, I'm trying to replace the content of a WPF grid control by another WPF grid defined in a second XAML file in code (c#). (simplified example) Window1.xaml: <Window x:Class="Demo1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Heigh...

XAML: make a ScrollViewer show scrollbars when the ScaleTransform of a child object gets big

Hi. I am making a sort of "print preview" control for some documents in my Silverlight 3 application. I have a Canvas (for showing the document) inside of a ScrollViewer, and I have zoom in / zoom out buttons that control the X and Y Scale properties of the ScaleTransform for the Canvas.RenderTransform property. I want the scrollbars ...

Is it possible to seletively color a label in Silverlight?

For instance, if I have a label: Blah blah bladity blah I want the first 10% of this label, such that the font color should be red, and the rest should be green. This perhaps means it would color the Bl and PART of the a. Basically pixel-wise font coloring instead of character-wise. Is this possible and how would is be accomplished? ...

How to set focus for CustCombBox in a CellEditingTemplate when entering page at the first time(MVVM Pattern)

<data:DataGrid x:Name="dg" ItemsSource="{Binding Mode=TwoWay, Path=**ViewModel**}" HorizontalAlignment="Stretch" Width="Auto" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" AutoGenerateColumns="False" PreparingCellForEdit="dg_Pre...

How do I display data in a table and allow users to copy selected data?

Hi I have a long list of data that I want to display in table format to users. The data changes when the user performs certain actions in my app, but it is not directly editable. So the user can create a reasonably big table of data, but he can't change individual cells' values. However, I do want the data to be copy-able. So I want it...

Style the MouseOver on a Silverlight/WPF button

Struggling with styling the mouse over for a button ... I have managed to style the button (solid red), but I would like for it to change to solid black whenever a mouse over occurs. I am new to XAML, and I can see that it wants some type of story board/animation ... not sure exactly how to do this. Any help would be greatly appreciated...

Animating properties of the content of a template in Silverlight

Let's say I have a control like this: <Button Style="{StaticResource MyButton}"> <Polygon Style="{StaticResource MyButtonIcon}" Points="... some points ..." /> </Button> MyButton is the style for the background of the button while MyButtonIcon is the style of the button icon polygon itself. I'd like to subtly animat...

WPF DockPanel doesn't respect the "Filled" control's desired size

I have the following Xaml (simplified for brevity, but will repro the problem in Xamlpad or Kaxaml): <DockPanel Width="400"> <TextBlock DockPanel.Dock="Left" TextWrapping="Wrap"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum massa metus, ornare in fringilla nec, fringilla at orci. Nunc p...

XAML Parsing Exception

I have a simple XAML page that load fine when it is loaded as part of any application within Visual Studio. However, when I deploy this application using ClickOnce, I get the following exception: Type : System.Windows.Markup.XamlParseException, PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 ...

Binding a CollectionViewSource in a ControlTemplate

I am trying to create a ControlTemplate which will merge 2 IQueryables (and some other things) into a CompositeCollection. I am having issues getting the CollectionViewSource.Source to bind correctly to the template. It looks like TemplateBinding in the Resources section is not supported. What is the best way to get around this limitati...

How to call a method or use a variable from a different namespace in another class in another namespace in a xaml file?

How to call a method or use a variable from a different namespace in another class in another namespace in a xaml file? ...

Applying a style to a gridview

I have been tearing my hair out all afternoon on this, hopefully someone can help me. Bear with me on this one. I have a number of styles in my App.xaml which transforms a gridview, the code looks like this. <Application.Resources> <Style x:Key="{x:Static GridView.GridViewScrollViewerStyleKey}" TargetType="{x:Type ScrollV...