简体   繁体   中英

Unable to use barEditItem in devexpress ribbon control wpf

I m trying to add checkbox in ribbon control but im not able to do so. I have tried to use barEdtitItem but it is not working. I m using devexpress riboon control and i didn't got its solution online. Please find the attached image. 在此处输入图片说明

You can use bar items in ribbon inside quick access toolbar (RibbonControl.ToolbarItemLinks property), page header (RibbonControl.PageHeaderItemLinks property) or inside page groups. Thus you should define a category, page and group to show bar item inside the ribbon. Note that you cannot put bar items into the page group directly so you should define it inside the BarManager.Items collection first.

<dxb:BarManager>
    <dxb:BarManager.Items>
        <dxb:BarEditItem x:Name="bEdit" EditValue="true" EditSettings="{dxe:CheckSettings}"/>
    </dxb:BarManager.Items>
    <dxr:RibbonControl>
        <dxr:RibbonDefaultPageCategory>
            <dxr:RibbonPage Caption="Home">
                <dxr:RibbonPageGroup Caption="First">
                    <dxb:BarItemLink BarItemName="bEdit"/>
                </dxr:RibbonPageGroup>
            </dxr:RibbonPage>
        </dxr:RibbonDefaultPageCategory>
    </dxr:RibbonControl>
</dxb:BarManager>

You have to create an RibbonPageCatogory first. Inside that element you can define the BarEditItem .

<dxb:RibbonPageCategory x:Name="category">
// Your elements here
</dxb:RibbonPageCategory>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM