|
You would do better looking at SilverLight. It is certianly possible - performance is up to you though.
|
|
|
|
|
Oh sorry. I was asking if it is possible or not in WPF to do the functionality. is it possible or not? I don't intent to make this thread to discuss silverlight.
|
|
|
|
|
He wasn't he was suggesting that you use Silverlight as it is a tool that is more suited to your problem.
WPF Controls in a asp.net page
This might be a better starting place for you
As barmey as a sack of badgers
Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.
|
|
|
|
|
You can run a WPF app within a browser - look up XBAP but really from the brief spec you have provided SilverLight would be preferable. Functionality and performance is up to you.
|
|
|
|
|
Thanks! The choice of WPF was to avaoid the browser rendering time as the time is consumed more while rendering. So is it wise to create a WPF app and use libraries like XBAP?
|
|
|
|
|
The problem with XBAP's is that they require a certificate, and those cost money. Silverlight might be the way to go if it's all you need. If you converting a web page (e.g., Javascript, HTML, CSS) to something, then Silverlight should suffice. Silverlight supports things that will help performance, such as virtualization, though there are some differences as compared to WPF.
|
|
|
|
|
Do you only intend to target Windows IE customers? If so, you can use an XBAP; if not, you need to look at Silverlight.
|
|
|
|
|
Hi,
Yes. Just go ahead with XBAP application which enables your application as desktop application without any performance issue.
MVVM devotee
|
|
|
|
|
If you are fine with XBAP, you might as well use ClickOnce and deploy a WPF desktop app. That'd be a far more convenient approach.
|
|
|
|
|
hello,
i have trouble with the wpf toolkit accordion control.
i have a UserControl which creates a dynamic nested accordion control (3 levels).
when the 3rd level accordionItem is clicked a new usercontrol, also a accordion but in XAML, will be added to the content of the 3rd level accordionItem.
both usercontrols have a link to a ResourceDictionray (Theme) like this:
xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit">
<Grid Name="MainGrid">
<Grid.Resources>
<ResourceDictionary Source="../View/Themes/CustomAccordion.xaml"></ResourceDictionary>
</Grid.Resources>
</Grid>
the problem is, that the XAML accordion display my theme configuration but the dynamic created accordion won't display the same theme.
does anybody know why?
thanks for any help
|
|
|
|
|
i checked my code and found the problem
accordionItem.SetResourceReference
was set and does override my ResourceDictonary Source
|
|
|
|
|
Hi,
I am working with a WPF project and have a string property Address.
StackPanel Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" Margin="2,2,10,2" Visibility="{Binding Address, Converter = {StaticResource FormatAddress}}"
The converter FormatAddress is returning Visibility.Visible if Address is !string.Empty and !="".
Can I use this converter if I want show the StackPanel if the Address is string.Empty or ""? Or do I have to create a new converter for this case?
Regards
Olof
|
|
|
|
|
Why not just use string.IsNullOrWhitespace in the converter to decide whether the string is empty or not?
|
|
|
|
|
He can, provided he is using .Net 4.0.
As far as I remember (from a previous discussion), this does not exist in versions before 4.0.
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.
|
|
|
|
|
True, but it's easy to replicate the logic.
public static bool IsNullOrWhitespace(this string text)
{
if (string.IsNullOrEmpty(text))
return true;
return text.Trim() == string.Empty;
}
|
|
|
|
|
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.
|
|
|
|
|
Yes. You can just use the same converter. make sure that your converter always returns Visibility type instead null or string.
MVVM devotee
|
|
|
|
|
You could probably use a trigger. You can set visibility based on the true/false.
|
|
|
|
|
Hello,
i have created a listbox that uses databinding that contains many items
each item has two 2 textblock and one hyperlink button.
one textblock is named ID and is Collapsed.
when i press the hyperlink button i want to get the value stored in ID so i can pass it to a new Page that i open.
Is this possible, and how?
|
|
|
|
|
I don't know about others but I used :-
private void CheckBox_Unchecked(object sender, RoutedEventArgs e)
{
ComboBox cmb = (ComboBox)((sender as Control).Parent as Panel).Children.First(x => (x as Control != null) && (x as Control).Name == "cmbShipState");
cmb.Visibility = System.Windows.Visibility.Visible;
}
to find a sibling of a control on its click event.
I will appreciate if somebody can show me a better way to accomplish the same.
Note : The code is of different context but I think you can convert it for your scenario.
Thanks and Regards
Amar Chaudhary
HBCC-Tech
|
|
|
|
|
You might want to consider the command approach.
Pass in the id as the command parameter.
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.
|
|
|
|
|
My scenario is little different as I have to show/hide few controls in row detail template of data-grid - please suggest me something for that - an attached code example would be of great value.
Thanks and Regards
Amar Chaudhary
HBCC-Tech
|
|
|
|
|
Hi,
Its simple. Just get the data context of your hyperlink button or combobox, and get the business object property to get the actual value which you bound with textblock. Hope you can get my point.
MVVM devotee
|
|
|
|
|
Thanks for the answer, i'm new to silverlight so could you help me out to get the hiddenID value?
this is my listbox with the datatemplate
The listbox is loaded with many different items, the header=hyperlink does not have unique contents.
What i want is to pass the current HiddenID that correspons to the hyperlink
Ex:
hiddenID = 34
Hyperlink = "Recent events"
Content = "short description"
when i press "Recent events" and trigger the hyperlinkbutton event i want to be able to get the value from hiddenID
<ListBox x:Name="ListboxNews" ItemTemplate="{StaticResource NewsTemplate}" ItemsSource="{Binding _News}" Margin="8,38,8,8" Opacity="1" BorderThickness="0" Background="White" />
<DataTemplate x:Key="NewsTemplate">
<Grid Background="White" HorizontalAlignment="Left" Height="59" VerticalAlignment="Top" Width="265">
<HyperlinkButton x:Name="NewsHyperLink" Content="{Binding Header}" FontSize="18.667" FontWeight="Bold" FontFamily="/StartPage;component/Fonts/Fonts.zip#Calibri" Click="HyperlinkButton_Click" Background="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" d:LayoutOverrides="HorizontalAlignment, VerticalAlignment" Margin="10,0,0,0"/>
<TextBlock x:Name="Content" Text="{Binding Content}" TextWrapping="Wrap" Width="265" FontFamily="/StartPage;component/Fonts/Fonts.zip#Calibri" FontSize="16" Foreground="Black" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="12,23,0,0" />
<TextBlock x:Name="HiddenID" Text="{Binding NewsID}" Width="20" VerticalAlignment="Top" d:LayoutOverrides="VerticalAlignment" FontSize="16" HorizontalAlignment="Left" Margin="-2,0,0,0" />
</Grid>
</DataTemplate>
|
|
|
|
|
Hi,
Here is the Click Event handler which i said
private void Link1_Click(object sender, RoutedEventArgs e)
{
string id= ((sender as HyperlinkButton).DataContext as YourBusineesObject).HiddenID;
}
Let me know if this works.
MVVM devotee
|
|
|
|