Hi,
I've searched the internet how to do this but I only came to the conclusion this isn't going to be easy or even possible to do. Does anyone know (if possible) how to do this? If not, does somebody know a workaround?
If I know what to look for it would be easier for me.
Binding to a Grid's ColumnDefinition
Page 1 of 14 Replies - 2454 Views - Last Post: 14 March 2013 - 12:00 AM
Replies To: Binding to a Grid's ColumnDefinition
#2
Re: Binding to a Grid's ColumnDefinition
Posted 03 March 2013 - 08:20 AM
Could you please explain a little more what exactly you're trying to accomplish maybe with code or pseudo code examples? If you're simply trying to bind data from an object to the DataSource of a grid then that is definitely possible.
#3
Re: Binding to a Grid's ColumnDefinition
Posted 03 March 2013 - 04:22 PM
I just need to be able to bind a ColumnDefinition Width at runtime. I know how it works for normal let's say, binding a text for a textblock or a source for an image. I just can't get to bind the ColumnDefinition Width of my Grid.
I won't be able to reply till March the 9th cause of travel.
I won't be able to reply till March the 9th cause of travel.
This post has been edited by KFredje: 03 March 2013 - 04:23 PM
#4
Re: Binding to a Grid's ColumnDefinition
Posted 05 March 2013 - 10:55 PM
Have you tried creating a method that gets the width you need then assigning it to the set accessor of a property? Once you do that then you could just bind to the property by doing:
Note: I have not tested this so the XAML may not be exactly accurate.
<ColumnDefinition Width="{Binding Path=PropertyName}"/>
Note: I have not tested this so the XAML may not be exactly accurate.
#5
Re: Binding to a Grid's ColumnDefinition
Posted 14 March 2013 - 12:00 AM
I found on the internet databinding isn't possible with ColumnDefinition since they are ColumnDefinitionCollection's. Anyhow, I give it a try.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote





|