UWP XAML RadDataGrid包裹标题文本

时间:2017-06-24 17:16:58

标签: xaml uwp telerik

我有一个简单的RadDataGrid

Trying to load class md5e940e1e778de0f856e343395a2f338c5.XFPageRendererView
>mono.android.DesignerException: java.lang.UnsatisfiedLinkError
    at mono.android.DesignerException.fromThrowable(DesignerException.java:46)
    at mono.android.DesignerSession.checkRenderResultForError(DesignerSession.java:187)
    at mono.android.DesignerSession.load(DesignerSession.java:239)
    at mono.android.DesignerSession.processMessage(DesignerSession.java:702)
    at mono.android.MessageListener.executeMessage(MessageListener.java:88)
    at mono.android.MessageListener$Runner.run(MessageListener.java:44)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.UnsatisfiedLinkError: md5e940e1e778de0f856e343395a2f338c5.XFPageRendererView.n_onMeasure(II)V
    at md5e940e1e778de0f856e343395a2f338c5.XFPageRendererView.n_onMeasure(Native Method)
    at md5e940e1e778de0f856e343395a2f338c5.XFPageRendererView.onMeasure(XFPageRendererView.java:54)
    at android.view.View.measure(View.java:19734)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6120)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
    at android.view.View.measure(View.java:19734)
    at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715)
    at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461)
    at android.view.View.measure(View.java:19734)
    at com.android.layoutlib.bridge.impl.RenderSessionImpl.measureView(RenderSessionImpl.java:589)
    at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:342)
    at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:429)
    at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:368)
    at mono.android.DesignerSession.load(DesignerSession.java:233)
    ... 4 more

我想包装列标题文本,以适应特定的宽度。您可以在DataGridTextColumn标题中指定列宽,但我没有看到任何包装文本的方法。有谁知道如何做到这一点?

由于

1 个答案:

答案 0 :(得分:1)

事实证明这很容易。

您可以这样做:

 <grid:DataGridTextColumn PropertyName="AccessCat">
                    <grid:DataGridTextColumn.Header>
                        <TextBlock>
                            <TextBlock.Inlines>
                                <Run Text="Access"/>
                                <LineBreak/>
                                <Run Text="cat."/>
                            </TextBlock.Inlines>
                        </TextBlock>
                    </grid:DataGridTextColumn.Header>
                </grid:DataGridTextColumn>