开发者

Silverlight Datagrid convert AutoGenerated columns to Xaml Columns Collection

开发者 https://www.devze.com 2022-12-18 12:01 出处:网络
Here is my scenario... I am prototyping in SketchFlow so I create an Xml file for my dummy data and then databind that to a data grid. I then want to setup some things like widths and header text inst

Here is my scenario... I am prototyping in SketchFlow so I create an Xml file for my dummy data and then databind that to a data grid. I then want to setup some things like widths and header text instead of using all autogenerated details.

So here is the question... Is there an easy way to convert the Autogenerated columns into Xaml so they can be customised?

Its only as a way to decrease development/prototyping time.

Thanks in advance.

Btw, I use an xml file because I have fairly specific details that need to be displayed and the dummy Lorem Ipsum data doesnt really cut it.

Update

I used Silverlight Spy in the hope that somehow I could inspect the Xaml of the objects (I could) however there is still no X开发者_StackOverflow中文版aml for the autogenerated columns.


Unfortunately, I think this functionality is non existent. What I would have liked to see is a button 'Copy From Datasource' when looking at the column collection in expression blend.

In the meantime, I think Split Screen/Xaml mode and copy paste is the next best option.

<data:DataGridTextColumn Binding="{Binding [Column], Mode=OneWay}" Header="[HeaderText]"/>

It just gets a little tedious when you find yourself doing it over and over again...

Hopefully one of you out here have found a work around

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号