Hello,
I have a Item called MiniMap in my xaml. I have set the background of it to a visual brush representting a canvas Item. Now, I want to scale the background to a ratio 0.7 . How can I do it?
Thanks in advance
<local:MiniMap Width="201" Height="134" x:Name="MiniMapItem" MinHeight="100" MinWidth="100" Opacity="1" SnapsToDevicePixels...
When looking at sample attached properties and behaviors, I've seen a mishmash of uses of FrameworkPropertyMetadata, UIPropertyMetadata and PropertyMetadata. Since they all form an inheritance hierarchy, how do I choose which one to use?
...
I've got a "Loading Progress" WPF form which I instantiate when I start loading some results into my Main Window, and every time a result is loaded I want the progress bar to fill up by x amount (Based on the amount of results I'm loading).
However what happens is that the Progress bar in the window stays blank the entire time, until th...
I am using Visual Studio 2010 RC1.
I define a resource "Brush2" in app.xaml_:
<Application x:Class="VideoThumbnails.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources...
I have a Button Style:
<Style x:Key="ButtonStyle1" TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<Path x:Name="path1" ... Data="...some data...">
<Path.Fill>
<LinearGradientBrush EndPoint="0.5,-0.3" S...
Hi
I cannot seem to bind a command to a button.I have a treeview on the left showing
Country
City etc..
And I tabcontrol on the right. do I This uses 4 viewModels
rootviewModel-ContinentViewModel-CountryViewModel-CityViewModel
What I am building is based on
http://www.codeproject.com/KB/WPF/TreeViewWithViewModel...
I create array:
TextBox[] textarray = new TextBox[100];
Then in cycle set this params, all items array situated in uniformGrid1
textarray[i] = new TextBox();
textarray[i].Height = 30;
textarray[i].Width = 50;
uniformGrid1.Children.Add(textarray[i]);
How create events Click or DoubleClick that all items arra...
Hi,
I tried to make up an example to show my problem.
My combobox has a list of objects as itemssource. In my example it's a list of Persons. In the combobox i want to show the first name and the last name of the person. But i want to save the last name of the person in the "owner" property of the house-object.
My guess was that i bi...
For those who have spent time in Visual Studio 2010, and work with WPF, how much better, if any, is the designer for WPF? Are other designers, such as Blend, still preferred, or can we be productive in VS 2010?
...
Hello
I am fighting with this problem:
I have a usercontrol which contains a textbox and a button (the button calls some functions to set the textbox's text), here is the xaml:
<UserControl x:Class="UcSelect"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Nam...
Hi,
Im looking to add a new feature to the WPF Calendar control,
At the moment this control allows you to set blackout dates...
So you can add a group of dates in which cannot be selected and they are shown grayed out
I want to add another collection of dates in which I can highlight in red to denote some kind of special events that h...
I have a problem with commands in an MVVM application (I am only learning MVVM so go easy).
MyClassViewModel is set to the datacontext for MainForm1, MyList is bound to UserControl1 datacontext and each item in the list is represented by UserControl2. I am trying to fire MyCommand in UserControl2 using the following:
<CheckBox IsChe...
I have a command binding on the main form of my application. It is used to open details of the item that i am viewing. It has an associated keyboard shortcut.
When i use the command in sub-forms i pass the object i want to open details for as a CommandParameter. This works if i attach the command to a button or a context menu, as i can ...
When you do code like
VisualStates.GoToState(this, useTransitions, VisualStates.StateNormal);
I believe this code will only work for Silverlight apps.
will this affect the way a WPF app works...
Trying to incorportae controls that can be shared between both silverlight and WPF apps and was just wondering what were the main pitfalls...
hai i need to play audio files in WPF
am using the following code
FileTextBox.Text = selectedFileName;
MediaPlayer mp = new MediaPlayer();
mp.Open(new Uri(selectedFileName, UriKind.Relative ));
mp.Play();
its working well, but it doesnt plays the sound. why ???
...
I got a ListView with GridView and GridViewColumns in it.
<ListView>
<ListView.View>
<GridView>
<GridViewColumn>
<GridViewColumn.CellTemplate>
<DataTemplate>
<ComboBox />
...
I have a variable MediaElement variable named TestAudio in my Silverlight app.
When I click the button, it plays the audio correctly.
But when I click the button again, it does not play the audio.
How can I make the MediaElement play a second time?
None of the tries below to put position back to 0 worked:
private void Button_Click_P...
I am working on a solution that used DDD for architecture. I have a property in my ViewModel which points to a ValueObject, the view model also implements INotifyPropertyChanged interface. The value of the ValueObject will change as a user enters data on the front end. The problem I am running into is the value object is suppose to be...
I have a custom panel for a listbox
<ItemsPanelTemplate x:Key="FloatPanelTemplate">
<Controls:FloatPanel x:Name="CardPanel" />
</ItemsPanelTemplate>
The panel lays out its children using its X and Y dependency properties.
This all works nicely when the FloatPanel is used by itself - I'm using FrameworkPropertyMetadataOptions.Affe...
I have a simple requirement as mentioned below:
A ListView or any control displays list of bitmaps/images. When user mouse hovers on any bitmap that bitmap zoomed to show that is currently selected.
Since I have to provide drag drop operations and click operation that why I taken the list view.
Pleas help!!
It will be great if any bo...