|
Hi surfluds,
May be this link could help you.
http://endofstream.com/charts-creating-custom-style-for-linedatapoint/
|
|
|
|
|
I fancy expanding my Very Limited knowledge and would appreciate a link to an Idiots Guide in order to have a play around and maybe make a few basic attempts at prettiness.
Recommendations?
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC League Table Link
CCC Link[ ^]
|
|
|
|
|
Silverlight or WPF? The choice is very dependent on the tech.
|
|
|
|
|
Silverlight.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC League Table Link
CCC Link[ ^]
|
|
|
|
|
The truly wonderful Jesse Liberty has posted a set of tutorials here[^].
|
|
|
|
|
I thank you.
My weekend is sorted!
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC League Table Link
CCC Link[ ^]
|
|
|
|
|
You are most welcome. Life is good right now - I'm writing a Silverlight app with the Dr Who episode "The Lodger" on in the background.
|
|
|
|
|
Depends. Do you intend to use Expression Blend[^]?
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Hi,
I am trying to apply a style to a combo box but instead of getting applied the combo box itself disappears. Please check the following xaml code for user control.
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Luna"
x:Class="Guardian.PAS.PASFramework.UI.WPF.PASComboBox"
xmlns:local="clr-namespace:Guardian.PAS.PASFramework.UI.WPF"
Height="26" Width="100" VerticalAlignment="Center" >
<UserControl.Resources>
<Style x:Key="comboBoxStyle" TargetType="{x:Type local:PASCustomComboBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:PASCustomComboBox}">
<ControlTemplate.Triggers>
<Trigger Property="local:PASCustomComboBox.IsEnabled" Value="false">
<Setter Property="Background" Value="Red"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Canvas Name="canvas" Height="23" Width="Auto" VerticalAlignment="Center">
<Label Height="23" Name="lblCaption" Width="20" VerticalAlignment="Center">aaa</Label>
<local:PASCustomComboBox Height="23" x:Name="cmbComboBoxControl" VerticalAlignment="Center" Width="50"
IsEditable="True" Style="{StaticResource comboBoxStyle}">
</local:PASCustomComboBox>
<Button Height="23" Name="btnSearch" Width="25" Click="btnSearch_Click" Visibility="Collapsed"
VerticalAlignment="Center">...</Button>
<Label Height="23" Name="lblDescription" VerticalAlignment="Center" Width="20" Foreground="Blue">
</Label>
</Canvas>
</UserControl>
Here PASCustomComboBox is a class which inherites from combo box.
public class PASCustomComboBox : ComboBox
{
protected override void OnPreviewKeyDown(KeyEventArgs e)
{
if (e.Key == Key.Down || e.Key == Key.Up)
{
e.Handled = true;
return;
}
base.OnPreviewKeyDown(e);
}
}
Please help!
Thanks in advance!
Regards,
Samar
|
|
|
|
|
When you set the Template property for a control, you're replacing the control with whatever is inside the template... In this case, you're replacing it with nothing, since the only thing you put inside your custom template is a trigger.
|
|
|
|
|
Oh... Then what should i write in the control template to show the current combo box as it is??? I am a little weak in xaml..!!
|
|
|
|
|
Don't use the Template unless you plan on replacing the entire control.
|
|
|
|
|
I have some user control that i wrote in simple C# winform.
I want to add it into WPF Window.
How can i do it ?
Thanks.
|
|
|
|
|
Probably this is not possible. I never tried. The reason behind is, WPF UI is designed using XAML code, so if you want to use it as XAML code it will not work. In the other hand, from the code behind I am not sure. But I think, it will not work.
Don't forget to Click on [Vote] and [Good Answer] on the posts that helped you.
Regards - Kunal Chowdhury | Software Developer | Chennai | India | My Blog | My Tweets | Silverlight Tutorial
|
|
|
|
|
Thanks,
I already found how to do it.
It is possible and its work fine.
This can be done by using 'WindowsFormsIntegration' on the xaml.
I found the example here[^]
|
|
|
|
|
Woh that's great. I was not aware of it. Actually I never worked with WinForm. Thanks for sharing the link.
Don't forget to Click on [Vote] and [Good Answer] on the posts that helped you.
Regards - Kunal Chowdhury | Software Developer | Chennai | India | My Blog | My Tweets | Silverlight Tutorial
|
|
|
|
|
i have some third party dll that can't work with WPF (just with winform)- so this is the reason i needed to do it.
|
|
|
|
|
Can be possible - this might give you some ideas[^].
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
|
Hi;
I'm new to WPF, and I'm trying to understand the underlying architecture, so please correct me if I'm wrong:
As far as I know, there are three possibilities to dynamically transform a GeometryModel3D during runtime:
a) Set the model's Transform-property to a Transform3DGroup once, to which you add new / duplicate Transformations.
b) Cast the model's Transform-property as a MatrixTransform3D and multiply its matrix with the Value-property of a Transformation (which i guess is pretty much case (a) )
c) Leave the Transform-property as a identity matrix and instead transform the model's Geometry.Positions property directly (provided you use a MeshGeometry3D) like such:
int i;
MeshGeometry3D mesh;
mesh = (_SomeModel.Geometry as MeshGeometry3D);
for (i = 0; i < mesh.Positions.Count; i++)
{
mesh.Positions[i] = _SomeTransform.Transform(
mesh.Positions[i]);
}
On first glance, option (c) seems like the best (though not most intuitive) choice, especially when you need the actual positions of the model(s); for example to calculate hit-detection.
Is there another way to easily access a model's current, transformed position(s)? And why does WPF transform a model's own space instead of just the actual coordinates?
Kind regards, Frank
|
|
|
|
|
I don't think (c) seems like the best option, although there are some scenarious where it might be appropriate to transform each vertex (or "position") directly...
The Transform property is there for a reason. You can move, rotate, scale etc. the entire model by setting just one matrix. That's far easier than transforming each vertex.
There is also a good reasony why WPF stores the positions relative to the model's coordinate system. This is actually how almost every CAD program and 3D engine works. Most of the time when you are editing the shape of a model you don't really care how the model is oriented and transformed, because you only pay attention to the shape itself, that's why relative coordinates are useful. You can always get the global coordinates easily by using the model's transformation matrix.
One more thing: moving each vertex of the model might be a lot slower than transforming the whole model at once. It depends on the implementation of the 3D engine, but if you set the Transform property of the model, the transformation of all vertices might be hardware accelerated, while transforming each vertex individually will definitely run on the CPU.
I can't answer your question ("which method is the best") because it depends on your application... But I would try to avoid option (c).
|
|
|
|
|
Hi we are working with WPF ribbon control.....
But finding some problem with it...Like Ribbon Application Menu if we want to remove it using XAML code den we r not able to do dat...
|
|
|
|
|
Your question is not very clear.
Maybe posting some code here can help!
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Any idea how to do this? Auto completing multiple values separated by comma into a single autocompletebox. Something similar to gmail to/cc/bcc address textbox.
|
|
|
|
|
You might want to inherit the existing AutoCompleteBox control and right your own one.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|