|
Check out the Path class. Triangles and plus signs are easy
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
An easier way is to use an appropriate font. Triangles are just "y" in Wingdings 3.
|
|
|
|
|
Yes, for WPF apps one can use the Font but if he wants to use it for Silverlight, he has to create the shape using Path control.
Silverlight 5 Tutorials : 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
|
|
|
|
|
Member 2972992 wrote: two triangles one pointing up and the other pointing down along with the plus sign
It will be easier is you have Expression Blend Installed,the pen tool allow you to draw shape and you can convert a plus in text format to shape
|
|
|
|
|
If I have:
Dictionary<string, Dictionary<int, TestStruct>> _dict = new Dictionary<string, Dictionary<int, TestStruct>>();
and want the top level nodes to be bound to Key and the underneath nodes to be bound to Value.Name (from TestStruct), I have the following HierarchialDataTemplates:
<HierarchicalDataTemplate x:Key="TopLevelTemplate" ItemsSource="{Binding Value}">
<TextBlock Text="{Binding Path=Key}" />
</HierarchicalDataTemplate>
<HierarchicalDataTemplate x:Key="SecondLevelTemplate">
<TextBlock Text="{Binding Path=Value.Name}" />
</HierarchicalDataTemplate>
I got it to work with a data template selector like this:
public override DataTemplate SelectTemplate(object item, DependencyObject container)
{
FrameworkElement element = container as FrameworkElement;
System.Type t = typeof(System.Collections.Generic.KeyValuePair<int, TestStruct>);
if (item.GetType() == t)
return element.FindResource("SecondLevelTemplate") as DataTemplate;
return element.FindResource("TopLevelTemplate") as DataTemplate;
}
but that kind of seems hacky... is there a way to get generics going in the HierarchialDataTemplates?
I know the usual solution is to do something like:
public class ItemCollection : List<TestStruct>
and use ItemCollection everywhere, but that doesn't really work with Dictionaries, since you are still getting KeyValuePair(K, V) from the enumerator.
|
|
|
|
|
Good Day All
i have placed a CrossDomain and the ClientPolicy Files in the Root of the IIS directory wwwroot.
We are currently having a problem on our side, our Network administrator says he has opened port 80 , but those policy files are not accessible from outside.
i change the port of my site to 8081 and the site is fine, but it needs to policy files that are accessible through port 80.
i goolged a bit and i see some people trying to programatically change the address location of the policy file.
You see the policy files that i can access , i can access them if i entered the port, and IIS looks for the policy Files in the Root Directory and those are accessible with port 80.
There are two things that i can settle for.
1) Its either the port 80 issue is resolved
2) The Policy files should be accessible via the new port.
I used Fidler to inspect this and i have the results in the attachment
http://www.tiyaneproperties.co.za/FidlerResults.png[^]
I need advice.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
The port number is part of the domain and the client should be requesting the policy file at the same domain as the connection attempt. Are you sure it's requesting the file on port 80 or have you not configured the client to connect to the new port?
And why isn't the policy file accessible from outside on port 80?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
hi Mark it was accessing it on port 80, we have installed a new Server and now it is working, there was something that was blocking it.
thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
How to hide/remove a wpf system tray application from alt+tab dialog?
- Regards - J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers
|
|
|
|
|
Setting the main window Visibility = System.Windows.Visibility.Hidden hides it for me on Windows 7.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Is it possible to navigate from a child page to another child page when the navigation frame is in the main page.
|
|
|
|
|
Using the NavigationService might 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.
|
|
|
|
|
Hello!
I am developing a program. sometimes, i need to view something in a WebBrowser (using WindowsFormsHost or Awesomium)
I want to glass somewhere of my window (in webbrowser)
in winForms, I can make it black and it will glass inside browser (i think), but in WPF, I can't set a color inside webbrowser in black.
So, How do I glass something in WebBrowser (using WindowsFormsHost or Awesomium) in WPF?
Regards.
Mehdi Ghiasi
|
|
|
|
|
A cruel suggestion will be to add a border control on top of your web browser and set the background value to black with opacity of about 60%. You will have to control the visibility of this border control from code.
|
|
|
|
|
Hello,
Some time ago, my Visual Studio 2010 for some bizar reason would never be able to have IntelliSense find my 'LayoutRoot' in my Page1.xaml.cs file. Now recently, I looked at my .xaml file and removed some tags and now LayoutRoot shows up magically for some reason.
Could it be that 'LayoutRoot' won't show unless I have valid xaml? I remember that my prof told me it was my own responsibility for my machine working, and during the whole exam I couldn't get that darned 'LayoutRoot' to popup in IntelliSense.
I would like to know exactly what happened in my VisualStudio that made the LayoutRoot pop up again and what would prevent it from popping up.
Thank you
//Edit: I fixed it. My .xaml page had to have its 'Build Action' property set to 'Page' and not 'ApplicationDefinition'.
modified on Monday, July 11, 2011 6:37 AM
|
|
|
|
|
hello guys... I wanna know that whats the difference between the ADO.NET we use in silverlight and the one we use in Windows(Web) applications? How do they differ in usage (strategy), why dont we just use the simple ADO.NET of windows apps? Why we need a different machanism?
|
|
|
|
|
Well you don't use ADO in Silverlight, you can't the whole data assembly is excluded from SL assemblies. You have to supply the data via WCF. In the WFC you use ado.net just the same as the winforms, you just can't send a datatable/set to the Silverlight client. You need to serialise it, we use List<object> proxies.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
In addition to the other reply...
Silverlight apps run on the client in a browser, and except in certain circumstances, run with restricted privileges, making direct access to databases impossible.
As mentioned, ADO.NET should be used on the server, and the Silverlight client can use something like WCF[^] or WCF RIA Services[^] to transfer data to/from the server.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Well there is no ADO.Net in Silverlight.
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.
|
|
|
|
|
ObservableCollection is binded to ItemsControl and PropertyChange fired on CultureChangedEvent though the items in collection remains the same. This doesnot update the DataTemplate/ItemTemplate. I guess WPF ignores because no change made to the item collection. How do i force a refresh on DataTemplate? i had tried BindingExpression.UpdateTarget().
similar problem is addressed at this Link[^] but the recommended approach didn't work.
any idea?
- Regards - J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers
|
|
|
|
|
Have you tried raising a Reset notification on the collection?
|
|
|
|
|
Calculation of value of DependencyProperty[^]
1.Local value
2.Style triggers
3.Template triggers
4.Style setters
5.Theme style triggers
6.Theme style setters
7.Property value inheritance
8.Default value
Question is, what's difference between "Style trigger" and "Style setters"?
For example, below is "Style trigger"
<Button.Style>
<Style TargetType="{x:Type Button}">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="Blue"/>
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
OK
</Button>
I presume "Style setters" simply means:
<Window.Resources>
<Style TargetType="{x:Type Button}">
<Setter Property="FontFamily" Value="Times New Roman" />
<Setter Property="FontSize" Value="30" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Background" Value="#FFCA5132" />
</Style>
</Window.Resources>
From the reference [^]it says:
"Local value technically means any call to DependencyObject.SetValue, but this is typically seen with a simple property assignment in XAML or procedural code"
So by "Local Value", it means a simple assignment such as:
<Button Foreground="Blue" />
Am I right?
http://www.bobpowell.net/dependencyproperty.aspx[^]
dev
modified on Thursday, July 7, 2011 6:02 AM
|
|
|
|
|
A trigger has conditions and setters. When the conditions are met, the setters are applied. A standalone setter always applies.
|
|
|
|
|
I know there could be restriction for Silverlight application to access local file system and resources. Is it possible for a browser based silver light application made full trustable at client local machine by doing some settings in client machine?
|
|
|
|
|
No. In order to access the client-side file system, the app has to be run "out-of-browser", and even then, you're restricted to saving/retrieving files in a special folder.
EDIT ================
Why was this 1-voted? It's the correct answer.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
modified on Friday, July 8, 2011 11:56 AM
|
|
|
|