WPF:TextBlock和Label文字垂直顯示

簡(jiǎn)述

??制作曲線時(shí),Y軸標(biāo)簽需要垂直顯示。只需將TextBlock 或 Label 的Layout旋轉(zhuǎn)90°或270°即可。

創(chuàng)新互聯(lián)建站專注于汝州企業(yè)網(wǎng)站建設(shè),響應(yīng)式網(wǎng)站,購(gòu)物商城網(wǎng)站建設(shè)。汝州網(wǎng)站建設(shè)公司,為汝州等地區(qū)提供建站服務(wù)。全流程定制制作,專業(yè)設(shè)計(jì),全程項(xiàng)目跟蹤,創(chuàng)新互聯(lián)建站專業(yè)和態(tài)度為您提供的服務(wù)

代碼

<TextBlock x:Name="TbYAxis" Canvas.Left="10" Canvas.Top="50" FontSize="20" Foreground="White" Text="Y軸">
                <TextBlock.LayoutTransform>
                    <RotateTransform Angle="270"></RotateTransform>
                </TextBlock.LayoutTransform>
            </TextBlock>

            <Label x:Name="LbYAxis" Canvas.Left="50" Canvas.Top="50" FontSize="20" Foreground="White" Content="Y軸" Padding="0">
                <Label.LayoutTransform>
                    <RotateTransform Angle="90"></RotateTransform>
                </Label.LayoutTransform>
            </Label>

效果

WPF:TextBlock 和 Label文字垂直顯示

名稱欄目:WPF:TextBlock和Label文字垂直顯示
鏈接URL:http://bm7419.com/article34/gejgpe.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供定制網(wǎng)站、外貿(mào)網(wǎng)站建設(shè)、App開(kāi)發(fā)網(wǎng)頁(yè)設(shè)計(jì)公司、網(wǎng)站策劃、品牌網(wǎng)站設(shè)計(jì)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

成都做網(wǎng)站