I trying to read in a XPS file with XamlReader.Load ( XMLReader ). Some XPS files read in and I can walk through perfectly. One of the XPS files I am working, that displays correctly in IE, gives the following exception:
Cannot convert string '/png/1.png' in attribute 'ImageSource' to object of type 'System.Windows.Media.ImageSource'. C...
I have an app that allows the user to manipulate different types of data (images, text, whatever). When the user is working with one of these custom User Controls, I want to append a new drop down menu to the main menu. For example, in my ImageEditor User Control, I have the following xaml:
<UserControl.CommandBindings>
<CommandBin...
Hi,
Say i have an object like
class Item
{
string Value {get;set;}
}
class MyClass
{
List<Item> Values {get;set;}
}
How can i make it so that when i'm using this object in XAML, i can set the value property like so.
<MyClass>
<Item>A</Item>
<Item>B</Item>
</MyClass>
...
I need a control that implements the usual functionality an ItemsControl, with the following behavior:
If number of items to display does not fit into available space, instead of showing the scrollbar, the number of displayed items is reduced to be able to fit, while leaving available space for a "More..." or "< >" elements.
When numbe...
Hello,
I have the following XAML:
<StackPanel>
<Label Target="{Binding ElementName=txtSearch}" Content="_Search:" />
<TextBox x:Name="txtSearch" />
</StackPanel>
I have an extension method that accepts a UIElement parameter like so:
static public class MyExtensionMethods
{
static public string GetLabelText(this UIElement...
I'm trying to create a reflection effect and it's working great except that I have to hard-code some values. This is my XAML:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
<RowDefinition />
<RowDefinition Height="80"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="1" VerticalAlignment="Cen...
I have been playing with bindings in silverlight, and have figured out how to bind in code, but would prefer to keep the binding in the XAML.
This is the code that works in my .cs file:
System.Windows.Data.Binding IDBinding = new System.Windows.Data.Binding("ID");
IDBinding.Source = MyTrans;
IDBinding.Mode = S...
Hi :),
Is it possible to insert Javascript code into XAML?
Thanks
Q
...
I'm transforming some XML from DrawingML to XAML. Unfortunately, the XAML one is not working as expected with white spaces, but I have found a work around. Here's the problem:
Problem Statment
I want to write the following in a TextBlock:
Hi John, what did Sushi A say to
Sushi B?
So I would write:
<TextBlock>
<Run>Hey</Run>
...
Hello everebody. I write simple xaml-file in notepad:
<FlowDocument AllowDrop="True"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"><Paragraph />
<BlockUIContainer><Button Tag="another.xaml">Next...</Button>
</BlockUIContainer></FlowDocument>
This file contains BlockUIContainer with Button inside. Button also ...
Greetings,
We would like to create some text editor for our clients in our software. We would like to have a simple options like: bold, underline, italic, hyperlink.
Then i would like this message to be saved in db as xaml and then just bind the xaml string to my Content Control. The xaml can be as follows:
<TextBlock>
<TextBlock.Text...
I have the following situation: I want to develop a DSL. To generate the code, I would need the help of the XamlDOM Implementation, which offers static analysis and manipulation of XAML Code. Unfortunately, XamlDOM can only be used with .NET 4.
I wouldn't have a problem using the vs2010 and .NET 4.0 Betas, but I need to target the DSL f...
Hi all,
I'm Trying to get the value of a slider thats contained in a window from a usercontrol thats also contained in that window.
this is what i would like to accomplish.
<Window x:Class="TestApp3.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"...
Of so clear separation of UI is unique to XAML? I mean, you could even customize the entire UI of a 'pre-packaged control/component'...
Any light on other technologies that achieve this?
...
I have a singleton which once hit will load user profile information, I want to make it an application level resource in my SL3 application so that elements across the application can bind to it.
My code version of the instantiaion is a simple
UserProfile x = UserProfile.GetInstance();
I want to be able to do this in xaml in the app...
In my database I have a 2 columns (Kind and Priority) that are of type int. I also have an enum with the values of Kind and Priority. But when I try to display them into a GridViewColumn, it shows the integers and not the enum values. Do I need a converter Here is the enums:
public enum Kind
{
None = 0,
Task = 1,
Assignment ...
I'm trying to use SVG (really XAML) to define a path which looks like a downwards pointing arrow.
|
|
\ | /
\ | /
\ /
`
It is super-important that the edge of the arrow is sharp. I have tried with various combinations of M, L and z with no success.
...
I am having a frustrating time with Blend reporting "Window is not supported in a Windows Presentation Foundation (WPF) project." due to unbuildable configurations but can't quite work out how to mangle my way out of it.
I've worked out it is probably due to my trying to have a single solution with x86 and x64 configurations. There is n...
Why will not this work:
<Button Width="200" Height="50">
<Button.Style>
<Style TargetType="Button">
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource Self}, Path=Height}"/>
<Setter Property="Background" Value="Blue"/>
<Style.Triggers>
<Trigger Property="Button.Is...
I have the following class:
public class DefaultDropTargetAdvisor : IDropTargetAdvisor
{
I decided to make it have a generic parameter:
public class DefaultDropTargetAdvisor<TDragType>
: IDropTargetAdvisor where TDragType : class
{
This was my XAML before the change:
<local:DefaultDropTargetAdvisor x:Key="targetAdvisor1"/>...