|
Of course it is. You'd have to supply a completely new Data if that's what you were trying to achieve, but it is certainly doable.
|
|
|
|
|
A path is a geometric representation of a figure.
For e.g M stands for move or startpoint. M or m can both indicate different things. V would mean a vertical line.
This[^] does explain the syntax in little detail - however, using Expression Blend is actually a much easier option to generate paths[^].
|
|
|
|
|
In my view I have a data template with a button in it:
<Button x:Name="SelectionToggle"
Command="{Binding SelectionToggleCommand, Mode=TwoWay}"
Grid.Column="1"/>
The output window shows that "SelectionToggleCommand" is not found on the model. How do I properly bind this command to the viewmodel?
Thanks
Everything makes sense in someone's mind
|
|
|
|
|
One of the wonderful thing about WPF is that Command properties can bind to any class that implements ICommand. Typical examples are Josh Smith's RelayCommand or PRISMs DelegateCommand. Suppose that you have RelayCommand, then you would hook it up like this:
private RelayCommand selectionToggleCommand;
public RelayCommand SelectionToggleCommand
{
get
{
if (selectionToggleCommand == null)
{
selectionToggleCommand = new RelayCommand(SelectToggle, CanSelectToggle);
}
return selectionToggleCommand;
}
}
private void SelectToggle(object o)
{
}
private bool CanSelectToggle(object o)
{
return true;
}
|
|
|
|
|
I get that much. The problem is that my XAML is in a data template and the message I get says it can't find the command on my data model.
So I need to tell my code to look on the data context, not the model.
Everything makes sense in someone's mind
|
|
|
|
|
Without knowing how and where your DataTemplate is linked in, I can't offer too much other than to say you really need to look at using a RelativeSource to find the element you are interested in to get the DataContext from.
|
|
|
|
|
i need good website to learn silverlight3.0 can anyone suggests me?
|
|
|
|
|
|
just i wanna learn about silverlight3.0 so, i need your suggestion..
|
|
|
|
|
Why do you want to learn Silverlight 3? It's at version 5 now, and it's way ahead in terms of functionality.
|
|
|
|
|
actually i just need to know all the difference between silverlight versions thats why? i knew about earlier versions..
|
|
|
|
|
If you are very new to the language, going through a book would be a better bet.
|
|
|
|
|
Hi All,
I need C1Flexgrid for WPF to be used as a usercontrol in my windows application project. I tried to do by inheriting the C1Flexgrid for WPF, but created user control is not listing in the toolbox. When I inherited normal DataGrid, its working fine. Can anyone help me out from this problem.
Thanks and Regards
Greeshma
|
|
|
|
|
I am thinking of doing an article on Silverlight treeview (I know done to death but I like to think I have an interesting take on the design) and was thinking of the bits required. I would probably use AdventureWorks for the data. Now here is the stray thought!
WCF services are pretty much a no brainer, especially if you only want to supply select functionality, so why does Microsoft not set up a public WCF to service all the demo/article/sample requirement for AdventureWorks. Allow anyone to get a List<> of any table or view in the database.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Thank you, presumably this is exactly what I was looking for, a WCF of the AdventureWorks data.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi, I am using the following code below to save and load the changes a user makes to shapes on a canvas (called 'myCanvas'). So I use the XamlWriter to save the entire Canvas to a file and the XamlReader to read. The XamlWriter writes appropriately but after calling the XamlReader the Canvas does not update with the saved content.
Am I missing a step?
private void Window_Loaded(object sender, RoutedEventArgs e)
{
FileStream fs = new FileStream("savedproperties.xml", FileMode.Open);
myCanvas = (Canvas)XamlReader.Load(fs);
}
private void Window_Closed(object sender, EventArgs e)
{
FileStream fs = new FileStream("savedproperties.xml", FileMode.Create);
XamlWriter.Save(myCanvas, fs);
}
|
|
|
|
|
Please how can I Fill a shape with horizontal or vertical lines only.
|
|
|
|
|
|
Thanks for your suggestion, Abhinav, though it didn't really help. But I guess that's because I still need to understand some graphics/wpf basics.
|
|
|
|
|
In my view model I have:
private void loadUserSettings()
{
OptionsAreaExpanded = Properties.Settings.Default.OptionsAreaExpanded;
ShowActiveContactsOnly = Properties.Settings.Default.ActiveContactsOnly;
}
private void saveUserSettings()
{
Properties.Settings.Default.OptionsAreaExpanded = OptionsAreaExpanded;
Properties.Settings.Default.ActiveContactsOnly = ShowActiveContactsOnly;
Properties.Settings.Default.Save();
}
The loadUserSettings method is called from the CTOR. Where's the right place to call saveUserSettings from.
Everything makes sense in someone's mind
|
|
|
|
|
In winforms there is an onclosing, I wonder if there is the same on a view. I used that in this article[^].
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I'd like to create this[^] blue area on a window.
I'm thinking a border to start with, but as far as the gradient, I'm not sure how to do that.
Any suggestions?
Everything makes sense in someone's mind
|
|
|
|
|
Heres a thought, why don't you download the source code from the example and chase through the style/xaml. Assuming of course that Karl has not supplied it as a theme.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Look at the XAML sections headed LinearGradientBrush .
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|