Telerik Forums
UI for WPF Forum
0 answers
107 views

Hello,

var rowList = gridControl.ChildrenOfType<GridViewRow>();
var emloyeeRowList = rowList.Where(x => (x.DataContext is AppointmentInfo) && (x.DataContext as AppointmentInfo).EmployeeId == employeeId).ToList();

If emloyeeRowList.Count is 2,and i insert a same employeeId AppointmentInfo to the ItemsSource of the GridView.The emloyeeRowList.Count is still 2.

When is the emloyeeRowList.Count 3?  Or which event should i used to get the emloyeeRowList.Count 3?

 

guo
Top achievements
Rank 1
 asked on 24 Jun 2020
2 answers
233 views

Is it possible to set the Scrollbars mode on a single control (not the whole app)?

FluentPalette.Palette.ScrollBarsMode = ScrollViewerScrollBarsMode.Compact;

Thanks,

Richard

Richard
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 23 Jun 2020
4 answers
1.2K+ views
First off, thank you for adding the sub-items on the hamburger menu, it's a great feature. 

I'm trying to reduce the number of clicks a user has to perform to get to a sub-menu in the worst-case scenario if they are already looking at an open sub-menu and want to go to another sub-menu of a different option it can take 3 clicks. 

1st Click closes the sub-menu of the current item
2nd Click opens the sub-menu of the new item
3rd Click activates the sub-menu On Click event. 

Is there a way to have the sub menus automatically open on mouse over to reduce this to one click?

Thanks,
Richard
Richard
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 23 Jun 2020
5 answers
265 views

I've read in the docs that RadChart supports charts with multiple areas for its series. Is there any way to get something similar in RadChartView?

In case it helps, what I'm trying to achieve is to "stack" vertically different series (candlestick, lines, bars) sharing one common horizontal axis but each with its individual vertical axis.

Martin Ivanov
Telerik team
 answered on 22 Jun 2020
0 answers
133 views

Hello, 

in my code I want to set the MajorTickLength.

But if I do that, the Visual Studio Designer freeze or crashed with a Out of Memory Exception. 

 

 

      <controls:RadScheduleView x:Name="MapScheduleView" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
                                  NavigationHeaderVisibility="Collapsed"
                                  MinAppointmentHeight="5"
                                  >
            <controls:RadScheduleView.ActiveViewDefinition>
                <controls:TimelineViewDefinition MinTimeRulerExtent="1" MaxTimeRulerExtent="Infinity" ShowTimeRuler="False"
                                                 StretchAppointments="True" StretchGroupHeaders="True">
                    <controls:TimelineViewDefinition.MajorTickLength>
                        <provider:OneYearTick/>
                    </controls:TimelineViewDefinition.MajorTickLength>
                </controls:TimelineViewDefinition>
            </controls:RadScheduleView.ActiveViewDefinition>
        </controls:RadScheduleView>

The tick provider:

public class OneYearTick : ITickProvider
    {
        public string GetFormatString(IFormatProvider formatInfo, string formatString, DateTime currentStart)
        {
            return string.Empty;
        }
        public DateTime GetNextStart(TimeSpan pixelLength, DateTime currentStart)
        {
            return currentStart.AddYears(1);
        }

}

Telerik Version: 2020.2.513.45

Best regards

 

Markus
Top achievements
Rank 1
Veteran
 asked on 19 Jun 2020
1 answer
301 views

Hi Telerik,

Do you have any report view control or similar control in WPF.net core which can connect to SSRS (2012 version and above) and view RDLC or local report?

Thanks,

 

Best Regards,

Loon 

Katia
Telerik team
 answered on 19 Jun 2020
2 answers
1.1K+ views
i want to remove the border of each columns headers in the grid view>i tried with borderthickness="0" , but it didnt work.Please help me in removing the border from  telerik grid view.
Flemming
Top achievements
Rank 1
Veteran
 answered on 18 Jun 2020
1 answer
605 views

I'm am trying to create a search with  Watermark Text Box and have a clear button at the end. The problem is that I can't get the background of the button to be transparent.

This is the code that I am using:

<telerikControls:RadWatermarkTextBox Name="SearchBox"
                  Text="{Binding SearchControl.SearchText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                  Width="250">
                    <telerikControls:RadWatermarkTextBox.WatermarkContent>
                        <StackPanel Orientation="Horizontal">
                            <telerikControls:RadGlyph Glyph="" Margin="0 3 0 0"/>
                            <TextBlock Margin="3,3,0,0" Text="Search" />
                        </StackPanel>
                    </telerikControls:RadWatermarkTextBox.WatermarkContent>
                    <telerikControls:RadWatermarkTextBox.AdditionalContent>
                        <telerikControls:RadButton Focusable="False"
                           IsBackgroundVisible="False"
                           Command="telerikControls:RadWatermarkTextBoxCommands.Clear"
                           CommandTarget="{Binding ElementName=SearchBox}"
                           ToolTip="Clear">
                            <telerikControls:RadGlyph Glyph=""/>
                        </telerikControls:RadButton>
                    </telerikControls:RadWatermarkTextBox.AdditionalContent>
                </telerikControls:RadWatermarkTextBox>

 

I have also tried to use Background="Transparent" but that still doesn't work.

I have also noticed that IsBackgroundVisible aslo doesn't work on buttons outside of the Watermark Text Box.

I have attached a photo of how the search box looks.

Sia
Telerik team
 answered on 18 Jun 2020
1 answer
247 views

When I run the Groups demo in the Gauge_WPF solution (no modifications), the linear / vertical gauge group doesn't look anything like what it's supposed to:

  • No indicators
  • Only 1.5 of the 4 ranges visible

(screenshot attached)

Can you pls. clarify how to fix this?

 

Vladimir Stoyanov
Telerik team
 answered on 17 Jun 2020
3 answers
224 views

Hello,

I cannot get a C# enumeration property based on dynamically created DefineEnum call to show up as popup on a PropertyGrid.  I've tried several things but nothing worked.  Also, I am dynamically creating the PropertyDefinition items instead of statically defining anything via XAML.

Here is the basic code to load the property definitions:

private void Window_Loaded(object sender, RoutedEventArgs e)
{
    PropertyDefinitionCollection properties = EditorPropertyGrid.PropertyDefinitions;
 
    List<KeyValueBase> testList = new List<KeyValueBase>();
 
    TestEnumKeyValue first = new TestEnumKeyValue() { Key = "Static Enum Prop", Value = TestEnum.test3 };
    testList.Add(first);
    properties.Add(new PropertyDefinition()
    {
        DisplayName = first.Key,
        Binding = new Binding("Value") { Source = first }
    });
 
    DynamicEnumBuilder _enums = new DynamicEnumBuilder();
    _enums.BuildDictionaries();
    Type dynamicEnum = _enums.getEnum("Employee", "Status");
     
    EnumKeyValue second = new EnumKeyValue() { Key = "Dynamic Enum Prop", Value = Enum.Parse(dynamicEnum, "PartTime")};
    testList.Add(second);
    properties.Add(new PropertyDefinition()
    {
        DisplayName = second.Key,
        Binding = new Binding("Value") { Source = second }
    });
 
    // ************************
 
    EditorPropertyGrid.Item = testList;
}

Here are the key value pair definitions:

enum TestEnum
{
    test1,
    test2,
    test3
}
 
class KeyValueBase
{
 
}
 
class TestEnumKeyValue : KeyValueBase
{
    public string Key { get; set; }
    public TestEnum Value { get; set; }
}
 
class EnumKeyValue : KeyValueBase
{
    public string Key { get; set; }
    public object Value { get; set; }
}

 

Here is the XAML:

<Grid x:Name="EditorGrid">
    <telerik:RadPropertyGrid x:Name="EditorPropertyGrid" Margin="10,10,10,10" DescriptionPanelVisibility="Collapsed" SearchBoxVisibility="Collapsed" AutoGeneratePropertyDefinitions="False" NestedPropertiesVisibility="Visible" AutoGenerateBindingPaths="False" SortAndGroupButtonsVisibility="Collapsed" />
</Grid>

 

And here is how I generate the dynamic enum:

class DynamicEnumBuilder
    {
        public Dictionary<string, Dictionary<string, Type>> _enumDictionary = new Dictionary<string, Dictionary<string, Type>>();
 
        public void BuildDictionaries()
        {
            Dictionary<string, Dictionary<string, List<ValuePair>>> _rawDictionary = new Dictionary<string, Dictionary<string, List<ValuePair>>>();
            _rawDictionary["Employee"] = new Dictionary<string, List<ValuePair>>();
            _rawDictionary["Employee"]["Status"] = new List<ValuePair>();
            _rawDictionary["Employee"]["Status"].Add(new ValuePair() { Name = "FullTime", StoredValue = "1" });
            _rawDictionary["Employee"]["Status"].Add(new ValuePair() { Name = "PartTime", StoredValue = "2" });
            _rawDictionary["Employee"]["Status"].Add(new ValuePair() { Name = "Retired", StoredValue = "3" });
            BuildValueDictionary(_rawDictionary);
        }
 
        private void BuildValueDictionary(Dictionary<string, Dictionary<string, List<ValuePair>>> _rawDictionary)
        {
            // Get the current application domain for the current thread.
            AppDomain currentDomain = AppDomain.CurrentDomain;
 
            //// Create a dynamic assembly in the current application domain,
            //// and allow it to be executed ONLY, NOT to be saved on disk!
            AssemblyName aName = new AssemblyName("TempAssembly");
            AssemblyBuilder ab = currentDomain.DefineDynamicAssembly(
                aName, AssemblyBuilderAccess.Run);
 
            // Define a dynamic module in "TempAssembly" assembly. For a single-
            // module assembly, the module has the same name as the assembly.
            ModuleBuilder mb = ab.DefineDynamicModule(aName.Name);
 
            foreach(var fieldEntry in _rawDictionary)
            {
                Dictionary<string, Type> valueTableDic = null;
                if (!_enumDictionary.ContainsKey(fieldEntry.Key))
                {
                    valueTableDic = new Dictionary<string, Type>();
                    _enumDictionary.Add(fieldEntry.Key, valueTableDic);
                }
                else
                {
                    valueTableDic = _enumDictionary[fieldEntry.Key];
                }
 
                Dictionary<string, List<ValuePair>> rawEnumDict = fieldEntry.Value;
                foreach (var fieldEnum in rawEnumDict)
                {
                    // Define a public enumeration with the name "Elevation" and an
                    // underlying type of Integer.
                    EnumBuilder eb = mb.DefineEnum(fieldEnum.Key+"Enum", TypeAttributes.Public, typeof(int));
 
                    // build the enumerations
                    List<ValuePair> values = fieldEnum.Value;
                    foreach (var valuePair in values)
                    {
                        eb.DefineLiteral(valuePair.Name, int.Parse(valuePair.StoredValue));
                    }
                    // Create the type and save the assembly.
                    Type dynamicEnum = eb.CreateType();
 
                    // now put it in the value dictionary
                    valueTableDic[fieldEnum.Key] = dynamicEnum;
                }
            }
        }
 
        public Type getEnum(String tablename, String fieldname)
        {
            Type result = null;
            if (_enumDictionary.ContainsKey(tablename))
            {
                Dictionary<string, Type> fieldDict = _enumDictionary[tablename];
                if (fieldDict.ContainsKey(fieldname))
                {
                    result = fieldDict[fieldname];
                }
            }
            return result;
 
        }
    }

 

Basically, I want the dynamic Enum to have a popup like the static Enum, instead of PropertyGrid rendering it as a string.

Any help will be deeply appreciated!

Thanks in advance!

Martin Ivanov
Telerik team
 answered on 17 Jun 2020
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?