如何在WPF devexpress中动态创建选项卡控件 [英] How can I create dynamically , tab control in WPF devexpress

查看:423
本文介绍了如何在WPF devexpress中动态创建选项卡控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何在wpf devexpress控件中动态创建一个选项卡控件,同时从列表中选择复选框。

即我在复选框中选择了多少tabcontrol应该使用选中的项创建名字。



我尝试过的事情:



我怎样才能创造动态,选项卡控件在wpf devexpress

how can we, dynamically create a tab control in wpf devexpress control , while selectiong the checkbox from the list.
ie, how many i selected in checkbox that much tabcontrol should be create with checked item name.

What I have tried:

How can i create dynamically , tab control in wpf devexpress

推荐答案

由于你还没有尝试任何东西,你在错误的论坛。完整的教程不构成快速回答



按照搜索 [ ^ ]



如果你遇到困难,那就回过头来看看你的代码,我们将尝试帮助
As you haven't tried anything yet you are in the wrong forum. A full tutorial does not constitute a "quick answer"

Work your way through the examples provided by this search[^]

If you get stuck then come back with your code and we will try to help


List<long> transfertype = unBoundSelectionHelperTransferType.GetSelectedKeys();

               if (tabControlCurrencyRangeSlabs != null)
               {
                   tabControlCurrencyRangeSlabs.Items.Clear();
                   DXTabItem dxTabItem;
                   List<long> distinctTransferTypes = transfertype;
                   for (int i = 0; i < distinctTransferTypes.Count; i++)
                   {
                       dxTabItem = new DXTabItem() { Header = TransferTypes.Where(x => x.LookUpDetailsID == distinctTransferTypes[i]).FirstOrDefault().DetailName, Tag = distinctTransferTypes[i] };
                       tabControlCurrencyRangeSlabs.Items.Add(dxTabItem);
                       if (!unBoundDictSelectionHelperSenderMandatory.ContainsKey(distinctTransferTypes[i]))
                           unBoundDictSelectionHelperSenderMandatory.Add(distinctTransferTypes[i], new UnBoundSelectionHelper<long>());

                   }
                   foreach (var tabItem in tabControlCurrencyRangeSlabs.Items)
                       ((DXTabItem)tabItem).Content = null;

                   grdCurrencyRange.SetParent(tabControlCurrencyRangeSlabs);
                   if (tabControlCurrencyRangeSlabs.SelectedTabItem != null) tabControlCurrencyRangeSlabs.SelectedTabItem.Content = grdCurrencyRange;
               }


这篇关于如何在WPF devexpress中动态创建选项卡控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆