I want my application to have a zoomable element which will allow the XAML elements to be viewed at 25%, 50%, 100%, 200% etc, I just need to alter the DPI of the XAML but am unsure how to do this on just part of the XAML (i.e. the element to zoom).
It will work just like the designer view in Visual Studio when you can zoom into the contr...
Just writing another TabControl ControlTemplate and wondering if there are good websites for Wpf Styles/Templates.
...
I have a string dependency property (SearchText), when updated, needs to update a collection dependency property (Results).
My collection dp:
public IEnumerable<string> Results{
get { return (IEnumerable<string>) GetValue(ResultsProperty); }
set { SetValue(ResultsProperty, value); }
}
public static readonly DependencyProperty Result...
I'm trying to do something like this...
<Style
x:Key="TwoByTwoGridStyle"
TargetType="Grid">
<Setter
Property="Grid.RowDefinitions">
<Setter.Value>
<ControlTemplate>
<RowDefinition
Height="*" />
<RowDefinition
Height="Auto" />
...
I'm running into a problem with the new Expression Blend behaviors.
I have a customized Behavior<T> class developed using the Expression Blend 3 SDK.
The behavior works properly, and the solution compiles. That is perfect. I have all of my references (System.Windows.Interactivity.dll + Microsoft.Expression.Interactions.dll) setup in ...
I'm trying to do something like this...
<Style
x:Key="MyBorderStyle"
TargetType="Border">
<Setter
Property="BorderBrush"
Value="{StaticResource MyBorderBrush}" />
<Setter
Property="Background"
Value="{StaticResource MyBackgroundBrush}" />
<Setter
Property="Padding"
Valu...
Hi,
In my current project (presentation, slide software) i need to be able to make some simple XAML, text images, movies and stuff like that. If it were HTMl i would go with fckeditor or another free editor, but what to do in XAML? Anyone know if its possible to make one yourself (like executecommand to a IE)? or download one from anywhr...
I want to make the Foreground property of a WPF Textbox red as long as its Text property does not match the Text property of another Textbox on the form.
I can accomplish this in the code behind and through a binding with a converter. But is there a way to do it in XAML only? (I was thinking of a Trigger of some kind).
...
Background:
I have a ListView/GridView with several columns. In some situations, only some of the columns are shown. Since there is no Visible property for GridViewColumns in WPF, I set the width of the columns I want to hide to zero. Visually, this achieves the desired effect (and I actually modified the ControlTemplate for the GridVie...
Hi!
Enough is enough - I've just spent an hour searching around trying to find out how to read the ListViewSubItem values (if that's correct terminology in XAML) from a ListView. Here's a little ListView:
<ListView x:Name="CreatableAccounts" ItemsSource="{Binding Processable}" Margin="10,0">
<ListView.View>
<GridV...
I have the following class,
internal class PageInformation
{
public string Name
{
get;
set;
}
public Uri PageUri
{
get;
set;
}
}
How can I use it in XAML (a page) and assign values to its properties?
Update-1:
I added xmlns attribute in page tag
<Page xmlns:local="clr-namespac...
Hi, I'm stumped here. I have an observable collection that holds business objects. I have it bound to ItemsSource of a ListBox. I am updating the X and Y of my object and it is being displayed correctly in the UI during runtime as it is bound the the Item top and Left. But, here is where the problem is. I have also bound some data to be ...
I have a square 400 x 400 with a plane projection attached to it
<Rectangle x:Name="Ground" Width="400" Height="400" Stroke="Black" VerticalAlignment="Bottom" Canvas.Left="60" Canvas.Top="50" >
<Rectangle.Fill>
<ImageBrush ImageSource="_images/grass.jpg"/>
</Rectangle.Fill>
<Rectangle.Projection>
<P...
Background:
I have a List<T> in my ViewModel defined as...
private List<FooBar> _fooBars;
public List<FooBar> FooBars
{
get { return _fooBars; }
set
{
if (value == _fooBars) return;
_fooBars = value;
OnPropertyChanged("FooBars");
}
}
FooBar is defined as...
public class FooBar
{
public st...
I want to be able to store various Canvas items in seperate XAML files so for example they are declared as:
<canvas x:Class="Item.One" Height="300" Width="400">
...
</canvas>
and another like this
<canvas x:Class="Item.Two" Height="300" Width="400">
...
</canvas>
I am wondering why I cannot get this to work when I try and load them...
I understand that Silverlight 3.0 has binding but just want a simple example on how to use this to read a property from a class.
I have a class called Appointment which as a String property called Location:
Public Property Location() As String
Get
Return _Location
End Get
Set(ByVal Value As String...
I'm brand new to learning Silverlight/XAML/C#.
I'm using an ASP.NET function to pass a string parameter to a Silverlight App. Currently I'm using the following code to simply verify that it works when the Silverlight App is loaded:
<Grid x:Name="LayoutRoot">
<StackPanel>
<TextBlock x:Name="txtIP" />
</StackPanel>
</Grid...
*Update: making the userIP static seemed to work. However, I learned that MainPage() is exectuting before Application_Startup(), so the InitParam values aren't immediately available. I may have to put my code somewhere else.*
I'm writing a Silverlight App and am taking in a variable in InitParams and I want that variable to be accessi...
I'm trying to write a silverlight application that takes in InitParams and then uses those InitParams to make a change to the Source of the MediaElement on the page. I'm trying to figure out the proper place to put my code.
I watched Tim Heuer's excellent video on InitParams, but in the video (which was for Silverlight 2), it shows the...
I'm trying to create a "button" with a rectangle since we're gonna have different images on MouseOver, Clicked and the "normal" state.
We started to use the button control but after setting the image on it in Vista using Chrome as the theme then when hovering the button the image got blurred out.
The images are created by the graphics t...