|
Abhinav S wrote: is the use of value converters
Yeah I have the nasty feeling that is going to be a requirement, I'm astonished there are no binding samples, I would think binding for any control a basic requirement
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I came across a converter that was doing some paragraph formatting for a rich text box. That was the closest I got to an example.
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 link, the only one I have found is for WPF and the xml reference used is not valid for silverlight.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
We have a WPF/XBAP application that the user downloads and executes once authenticating through an ASP.NET portal. After authenticating, ASP.NET passes the user's information (and some other configuration information) using a temporary cookie(s). The XBAP then uses this information to authenticate with a WCF service that the XBAP uses until the XBAP is closed by the user.
Of course the security hole here is that someone could potentially retrieve the cookie information from memory before the cookies are deleted, load the XBAP from the click-once cache, and put that cookie information in IE for the XBAP to retrieve. Of course the steps to do that are a little more complicated then what I mentioned, but you should get the idea.
Does anyone have any ideas on how the XBAP and it's communication between ASP.NET and the WCF service could be made more secure? I'm trying to think like a "hacker" so we can make this solution more secure, but I'm running out of options in my thought process.
We've thought about requiring the user to also authenticate using a login screen in the XBAP, but all of us know what kind of reaction we would get from users if they had to login twice.
|
|
|
|
|
We have a website and have a very complex page need to be developed. The page would contain a lot of datagrids and images that would be almost impossible to render without a page crash if we develop the page as it is. So it was suggested to develop the page in WPF instead of asp.net and then integrate it with asp.net. That is on click of a menu item it will launch a WPF UI.
Is it a possible way of doing as I am totally new to WPF?
|
|
|
|
|
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
|
|
|
|