|
Click once, WPF application. Possibly should be in the VS forum!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
Please share the video tutorial source for Entity Framework which uses WPF app as example.
|
|
|
|
|
|
Any free video tutorial web link
|
|
|
|
|
Hello team,
I have to develop a WPF based windows App that run on tablets (be pc tablet or which ever tablet family). I dont have to sell the app, its for internal use. Now, what is the type of app i have to do for?
1. Windows store app ? or windows desktop app?
what is this WindowsRT apps?
My system environment is:
1. HP elitebook revolve 810 tablet pc.
2. windows 8.1 x64 bit.
3. visual studio 2012 express.
I am confused and not able to choose the right documents to read from the msdn website. Please help
|
|
|
|
|
<Window x:Class="WpfTst1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="HTM Service Tool" WindowState="Maximized" WindowStartupLocation="CenterScreen"
FontFamily="Global San Serif" FontSize="14" Icon="pack://application:,,,/Resource/Icon/Truck16X16.ico"
>
<Window.Background>
<ImageBrush ImageSource="pack://application:,,,/Resource/Image/H1.jpg"></ImageBrush>
</Window.Background>
<Grid >
<Menu Height="24" IsMainMenu="True" VerticalAlignment="Top" HorizontalAlignment="Left" >
<MenuItem x:Name="FileMnu" Header="_File" HorizontalAlignment="Left" >
<MenuItem Header="_Login" ></MenuItem>
<MenuItem Header="_Exit" > </MenuItem>
</MenuItem>
</Menu>
</Grid>
</Window>
Don't know why the Fontsize="14" attribute not works on MenuItem, File,Login,Exit.
|
|
|
|
|
Because the default style applied to all Menu controls overrides the font size:
<Style TargetType="{x:Type Menu}">
<Setter Property="TextElement.FontSize">
<Setter.Value>
<DynamicResource ResourceKey="{x:Static SystemFonts.MenuFontSizeKey}" />
</Setter.Value>
</Setter>
</Style>
As documented on MSDN[^], values set in a Style override values inherited from parent controls.
You either need to set the font size explicitly on the Menu , or create and apply a new Style for the Menu .
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
HI All,
Can any one share sample code where using tree view with check box based on below data dynamically.
Also how can i read which check box is selected or not mean how i can read check box value whether its selected or not thru loop.
{ Name = "R1", Id = 1, ParentId = 0 },
{ Name = "R2", Id = 2, ParentId = 0 },
{ Name = "R3", Id = 3, ParentId = 0 },
{ Name = "D1R1", Id = 4, ParentId = 1 },
{ Name = "D2R2", Id = 5, ParentId = 2 },
{ Name = "D3R3", Id = 6, ParentId = 3 },
{ Name = "T1D2R2", Id = 7, ParentId = 5 },
{ Name = "T2D2R2", Id = 8, ParentId = 5 },
{ Name = "T3D1R1", Id = 9, ParentId = 4 },
{ Name = "T4D3R3", Id = 10, ParentId = 6 },
{ Name = "T5D3R3", Id = 11, ParentId = 6 },
{ Name = "D4R3", Id = 12, ParentId = 3 },
{ Name = "D4R3", Id = 13, ParentId = 3 }
|
|
|
|
|
|
At one time the Epxression Blend team had one available[^] but the download link no longer works.
I was able to get the assembly, but I'd like the code.
Anyone have one of these, or know of one? Source would be nice.
If it's not broken, fix it until it is
|
|
|
|
|
|
|
Yes. It's pointing to the same page I posted
If it's not broken, fix it until it is
|
|
|
|
|
You have his e-mail then....
|
|
|
|
|
I can try.. Did you see the date on that page.. 24 Oct 07
If it's not broken, fix it until it is
|
|
|
|
|
|
That's a blog pointing to the page with the source. The source page is 2007. The download link doesn't work.
I'll email the blogger, but I think it's a stretch.
If it's not broken, fix it until it is
|
|
|
|
|
I'm going to be controlling a camera... tilt/pan/zoom.
Anyone know of a joystick type of control for use in WPF? Something that looks like the little joystick on a game controller would be nice.
Thanks
If it's not broken, fix it until it is
|
|
|
|
|
|
I created a WPF (.Net 4) UserControl containing some ComboBoxes and a TextBox. In XAML, some ValidationRules are bound to the TextBox. If the TextBox contains invalid data, a red frame is shown, and the tooltip is set to the error description. Works well.
Next, I placed two instances of that UserControl on a form, and added a button. In XAML, the button is connected to a RelayCommand of the ViewModel. Now I want the button to be enabled only when both of the UserControls contain valid data only.
Not a problem, I thought, let me use a strategy which works elsewhere. I added a trigger:
<Button Content="_OK" ... Command="{Binding Path=OKCommand}">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Setter Property="IsEnabled" Value="false" />
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding ElementName=cascadingComboFrom, Path=(Validation.HasError)}" Value="false" />
<Condition Binding="{Binding ElementName=cascadingComboTo, Path=(Validation.HasError)}" Value="false" />
</MultiDataTrigger.Conditions>
<Setter Property="IsEnabled" Value="true" />
</MultiDataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
But there is a catch: Validation.HasError is always false for the UserControls - the Validation failed for an element inside the UserControl, not for the UserControl proper.
I know that I can register the Click event of the button, check the validity there using the method shown in http://stackoverflow.com/questions/127477/detecting-wpf-validation-errors[^], and prevent the execution of the RelayCommand by setting the Handled property of the RoutedEventArgs to true. But that looks more like WTF than WPF.
What do you suggest? How can I retrieve the Validation Errors of the UserControl's children? Or how can I get them in the RelayCommand's CanExecute method? Or some other tricks?
|
|
|
|
|
Rather than basing your validation on the UI, it's helpful to base it on the underlying ViewModel instead. A relatively simplistic approach is outlined in this[^] article.
|
|
|
|
|
There is another catch: the TextBox is bound to an int property. If the user enters "abc", updating the int property of the UserControl fails.
|
|
|
|
|
That's not a problem. That's precisely the type of thing a ViewModel is designed to solve. Have a property backing your TextBox of type string, and then test the input there. Only pass the value on if it's an int. Alternatively, back it with a Behavior[^] to ensure the user cannot enter invalid values.
|
|
|
|
|
Thanks for the hint. I'll look into that approach.
The vaildation errors occur in the realm of the UserControl, while the Button and its command are in the realm of the Window (and its ViewModel, resp.). Things will become more complicated, but I'll try it.
|
|
|
|
|