|
I'm totally agree with Mycroft Holmes. Don't forget to create a Converter for Visibility Enumeration.
Regards.
Christian Amado
MCITP | MCTS | MOS | MTA
DCE 0★ 1★ 2★ 3★ 4★ 5★
Bronze level MVA
Olimpia ☆ ★★★
|
|
|
|
|
Why? If the property you use to control the visibility is a boolean there is a built in BooleanToVisibilityConverter.
|
|
|
|
|
Pete O'Hanlon wrote: built in BooleanToVisibilityConverter.
What, where, I have one I use in my utils but I didn't know there was a built in one (Silverlight). I also have various NOT converters
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I'm not sure about Silverlight (I mainly stick with WPF), but in WPF 4 you can find details of it here[^]. Most people who worked with pre WPF4 have their own implementation of this control - MS was informed that there should be a default version.
|
|
|
|
|
Hi there. In Silverlight you must apply a converter to Visibility enumeration. Remember that Visibility property is an enumeration not a Boolean =)
Christian Amado
MCITP | MCTS | MOS | MTA
DCE 0★ 1★ 2★ 3★ 4★ 5★
Bronze level MVA
Olimpia ☆ ★★★
|
|
|
|
|
Go back to the start of the thread. The OP stated he was using WPF.
|
|
|
|
|
Ups. Sorry for that.
Regards
Christian Amado
MCITP | MCTS | MOS | MTA
DCE 0★ 1★ 2★ 3★ 4★ 5★
Bronze level MVA
Olimpia ☆ ★★★
|
|
|
|
|
No problem. It's an easy mistake to make.
|
|
|
|
|
Hi,
How can i open secondpage in silverlight on click event of button.
Thanks & Regards
Form :-
Vikash Yadav
Mob : 9210907172
|
|
|
|
|
Hi!
Imports System.Windows.Browser
HtmlPage.Window.Navigate(New Uri("http://zzz-server/zzz/Employees.aspx"), "_blank", "")
|
|
|
|
|
Do some research into navigation (assuming you do not just want an HTML page) here are the results of a search [^]in this forum, plenty of rich pickings in there.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
You can use Microsoft Prism[^] where your main screen is divided into regions.
Views (xamls) can then be removed and added to these regions.
Removing and adding views gives an effect of navigating across the application.
|
|
|
|
|
Hi friends,
I want basic idea how I can achieved sword effect. The one we see in fruit Ninja with which it cut fruits,
WANTED wasim khan(Killed 50 Innocent Buggs, Distroyed 200 Exception, make 5 Project Hostage) any Compnay Hire him will pay 30,000. Best place where u can get him is Sorcim Technologies Murre Road RWP
|
|
|
|
|
I don't have a clue, but the subject is funny.
Watched code never compiles.
|
|
|
|
|
WANTED wasim khan(Killed 50 Innocent Buggs, Distroyed 200 Exception, make 5 Project Hostage) any Compnay Hire him will pay 30,000. Best place where u can get him is Sorcim Technologies Murre Road RWP
|
|
|
|
|
http://www.fruitninja.com/[^] might be what he was talking about
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Ok, I finally got my treeview with hyperlinks working. Thanks SledgeHammer!
I now have the following
<Window.Resources>
<Style x:Key ="linkStyle"
TargetType="{x:Type Hyperlink}" >
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="TextBlock.TextDecorations" Value="Underline"/>
<Setter Property="Foreground" Value="RoyalBlue" />
</Trigger>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="TextBlock.TextDecorations" Value="{x:Null}"/>
<Setter Property="Foreground" Value="RoyalBlue" />
</Trigger>
</Style.Triggers>
</Style>
<HierarchicalDataTemplate DataType="{x:Type models:NodeModel}"
ItemsSource="{Binding Path=Children}">
<StackPanel Orientation="Horizontal"
Margin="2">
<TextBlock>
<Hyperlink NavigateUri="{Binding Caption}"
Foreground="#0C2DAA"
Style="{StaticResource linkStyle}"
CommandParameter="{Binding}"
Command="{Binding Path=DataContext.SelectedLinkCommand,
RelativeSource={RelativeSource FindAncestor,
AncestorType={ x:Type views:MainWindowView}}}">
<InlineUIContainer>
<TextBlock Text="{Binding Caption}" />
</InlineUIContainer>
</Hyperlink>
</TextBlock>
</StackPanel>
</HierarchicalDataTemplate>
</Window.Resources>
<Grid>
<controls:TreeViewEx ItemsSource="{Binding TreeData}"
SelectedItemEx="{Binding SelectedTreeItem, Mode=TwoWay}"
Grid.Row="0"
Grid.Column="0">
<TreeView.Resources>
<!--Make the selected item's background transparent-->
<SolidColorBrush Color="Transparent" x:Key="{x:Static SystemColors.HighlightBrushKey}"/>
</TreeView.Resources>
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
</Style>
</TreeView.ItemContainerStyle>
</controls:TreeViewEx>
</Grid>
I'd really like to have all the treeview styling done in one place, but I'm not sure how. I would like to move
<TreeView.Resources>
<!--Make the selected item's background transparent-->
<SolidColorBrush Color="Transparent" x:Key="{x:Static SystemColors.HighlightBrushKey}"/>
</TreeView.Resources>
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
</Style>
</TreeView.ItemContainerStyle>
out of the treeview up to the Window.Resources section.
If it's not broken, fix it until it is
|
|
|
|
|
|
Hello,
I have a problem I do a lot of research on the net but no solution.
I have a web service deployed in a server and an application in silverlight 4 on my machine, I call the web service from my application but I get an exception here is the exception:
CommunicationException was unhandled by user code: The remote server returned an error: NotFound
Thank you in advance for your help.
|
|
|
|
|
Have you checked to see that your web service is directly accessible? To do this, open it up in IE using the address you are using in your Silverlight application.
|
|
|
|
|
yes , the web service is directly accessible from IE
|
|
|
|
|
If you are still having this issue, I would recommend trying the techniques talked about here[^].
|
|
|
|
|
It does irritate me when some dipstik downvotes a helpful response - overbalanced!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I can only assume it's because I didn't wave the magic code wand.
|
|
|
|
|
Message size limit could also be the reason for this kind of error, try to increase the MessageSize in your service.
|
|
|
|