Re: [dotnet-120] WPF - ListiView (GridView) need help

From: Yitzchok
Sent on: Wednesday, August 19, 2009 12:31 PM
I am not sure if this is what you mean but can't this be done using a IValueConverter

?? ?public class CollapsedWhenNullConverter : IValueConverter
?? ?{
?? ? ??
?? ? ? ?public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
?? ? ? ?{
?? ? ? ? ? ?return value == null
?? ? ? ? ? ? ? ? ? ? ? ? Visibility.Collapsed
?? ? ? ? ? ? ? ? ? ? ? : Visibility.Visible;
?? ? ? ?}

?? ? ? ?public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
?? ? ? ?{
?? ? ? ? ? ?throw new NotImplementedException();
?? ? ? ?}

?? ?}



Yitzchok


On Tue, Aug 18, 2009 at 8:02 PM, Mahesh Chandra sehalli Jagadish <[address removed]> wrote:
Hello,
?
Please help me to handle this simple stuff. ?How do I collapse GridViewColumn inside GridView, if GridViewColumn value is empty?
?
I am following MVVM model. So on constructor of view I am setting ViewModel to view.datacontext. Inside datatemplate I have ListView, view mode is GridView. Problem is I need to collapse GridViewColumn whos value is empty.
?
Many thanks,
Mahesh




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Mahesh Chandra sehalli Jagadish ([address removed]) from New York .NET Meetup Group.
To learn more about Mahesh Chandra sehalli Jagadish, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here

Meetup Support: [address removed]
632 Broadway, New York, NY 10012 USA

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy