|
Where do I put
<ListBox ItemTemplate="{StaticResource myItemsTemplate}" x:Name="ExternalAlarmTable" />
It will not compile if it is inside a grid, which I need to do like this.
<Grid Grid.Row="1" Name="EACB" ShowGridLines="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="70"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding ZoneNum}" Grid.Column="0" />
<CheckBox Grid.Column="1" IsChecked="{Binding ExternalAlarm}" />
</Grid>
And, how do I implement my c# back code, if I can't bind UI like you say. See previous reply.
|
|
|
|
|
I'm testing the integration of a user control in the hands of my application wpf, the problem is that my editor is a user control that contains multiple windows forms. I found the xaml code but adding it does not work because the control is composed of several other controls (windows forms, user control ...)
<"Xmlns: myeditor =" clr-namespace.myeditor.EditorForm ">
|
|
|
|
|
hi guys ..
now i start begin work in WP7 for Graduation Project
and the first time use wp7 in this project i need to control desktop of PC via windows phone 7 i need any body to help me how i can do it (control desktop)
and clarify way to right work
plz
|
|
|
|
|
Isn't this your graduation project? It's the chance for you to step up and show that, not only have you learned the basics of writing code, you've also learned how to do research on problems for yourself. It's the chance to really show that you know how to think for yourself and to apply logic and deductive reasoning.
How would I start? Well, I'd research controlling desktops; and I wouldn't limit myself to any existing solution that uses WP7. I'd also make sure that I was familiar with good programming practice in my target platform, and that I was aware of the limitations in that platform.
All I can say is, good luck.
|
|
|
|
|
i begin work in wp7 but i facing problem in control mouse i need tutorial ?
|
|
|
|
|
You don't control a mouse on WP7. It doesn't have one - what it does have is a touch sensitive screen.
|
|
|
|
|
are u have any tutorial about it?
|
|
|
|
|
Did you see that bit in my post earlier about doing research for yourself? Well, that includes being able to find information for yourself - rather than waiting for someone to just give you the answer.
When you leave University, I take it you want to get a job as a developer. How do you think your employer would feel if you couldn't complete a task because you were waiting for someone on a forum to find a tutorial for you? Don't you think that your employer would prefer it if you were able to use tools such as Google to research problems, and find solutions?
The question is, how much do you want to be a good programmer? If you want to be good, you have to be able to research things for yourself. That's an ability that all the top developers have, and it's one you need to pick up if you want to join the elite.
|
|
|
|
|
yes that right the all what u say it's right and thnx so 
|
|
|
|
|
Good luck then. I hope you do well.
|
|
|
|
|
|
Ok i just found the workaround, it is to set IsReadOnly property of the DataGrid to True. Is is good, what could be thw consequences?
|
|
|
|
|
CanUserAddRows is true if DataGrid is not Readonly.
So either set CanUserAddRows or ReadOnly property to false.
"You get that on the big jobs."
|
|
|
|
|
I'm spirits to prepare the design of my application "sending emails" I look for new WPF controls that I can use them, I find some free controls and i thank you I'm still looking
|
|
|
|
|
Do you have a question?
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
You can always check out the WPF toolkit[^]. This could contain some controls useful to you.
|
|
|
|
|
This feels like a really dumb question but...
I have a Model which implements OnPropertyChanged on each field in the Model
The ViewModel has an ObservableCollection and SelectedObject of the Model. SelectedObject implements OnPropertyChanged.
When the user changed data in the textbox the Model gets that change event, how do I get the event to the ViewModel vi the SelectedObject
I assume I need to bind an event in the ViewModel to the Model OnChangeEvent. Do I need to add it to each Model as it is selected and remove it as it becomes unselected?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
In a way, yes. A simple way to do this is to use Observable.FromEvent from the Reactive Extensions.
|
|
|
|
|
Ah research just what I need on a Friday night, nah do it in the morning, me, a couple of beer and some satay are going to get to know each other. Thanks Pete.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
No problems mate. Have a beer or three for me.
|
|
|
|
|
Hi,
I want to show an image for datapoints (same image for each data point) of the scatter series.the xaml looks like this :
<UserControl.Resources>
<ImageBrush x:Key="ImageBrushStyle" ImageSource="Images\customImage.png" />
<Style x:Key="DataPointStyle1" TargetType="DVC:ScatterDataPoint">
<Setter Property="Background" Value="{StaticResource ImageBrushStyle}"/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="DVC:ScatterDataPoint">
<Image Source="Images\customImage.png"></Image>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Background="White">
<DVC:Chart Canvas.Top="80" Canvas.Left="10" x:Name="mcChart_CustomSection"
Width="800" Height="400"
Background="Gray">
<DVC:Chart.Series>
<DVC:ScatterSeries Title=" SampleData"
IndependentValueBinding="{Binding Path=Key}"
DependentValueBinding="{Binding Path=Value}">
</DVC:ScatterSeries>
</DVC:Chart.Series>
</DVC:Chart>
</Grid>
</UserControl>
Then,
The code sets the style in this way :
((ScatterSeries)mcChart_CustomSection.Series[0]).ItemsSource =
new KeyValuePair<int, int>[]{
new KeyValuePair<int, int>(1, 140),
new KeyValuePair<int, int>(2, 150)
};
var ss1 = (ScatterSeries)mcChart_CustomSection.Series[0];
mcChart_CustomSection.Series.Remove(ss1);
ss1.DataPointStyle = (Style)this.Resources["DataPointStyle1"];
mcChart_CustomSection.Series.Add(ss1);
But, it does not work.(The points are not plotted).
Is it possible to show image there(Images\customImage.png)?
Thanks.
|
|
|
|
|
Any ideas?
Since, my image is going to be like a rectangle, with some text inside it, I tried to first simply use :
<Rectangle Fill="Yellow" Width="100" Height="100" />
instead
<Image Source="Images\customImage.png"></Image>
It plots the datapoint and shows rectangle, but, the rectangle shown is very small. I want to increase the size of that rectangle.(increasing Height, width does not work).
|
|
|
|
|
Hello,
I have a textBox which has binding to a property of a ViewModel.
I want the ViewModel to execute a method if the textbox is not empty and if user didn't change the text in the textbox for 2 seconds. I mean only if user wrote something and waited for 2 seconds, than the method will execute. How can i do it?
|
|
|
|
|
Have a timer in the VM
Have the onchange event in the model for the field reset the timer (and clear the cache string, possibly)
In the tick method check the content of the field if != string.empty and matches the cached string then call your method
Cache the string
Onchange of the selected item always clear the cache string
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Sounds like too much work. When he adds a 2nd edit box / timer, he'll have to copy & paste all that crap. Better solution would be to write a "TextBoxEx" control that encapsulates the behavior so it is easier to reuse and you don't have to dick around with forwarding a bunch of stuff to the VM.
|
|
|
|