Telerik Forums
UI for WPF Forum
1 answer
570 views

Right now I set up the label's margin in xaml

<telerik:RadCartesianChart.HorizontalAxis>
                <telerik:CategoricalAxis MajorTickLength="0" LineStroke="Transparent">
                      <telerik:CategoricalAxis.LabelStyle>
                           <Style TargetType="TextBlock">
                                <Setter Property="Margin" Value="20 10 15 20" />
                           </Style>
                      </telerik:CategoricalAxis.LabelStyle>
                </telerik:CategoricalAxis.LabelStyle>
</telerik:RadCartesianChart.HorizontalAxis>

But I want to use property binding, so I created the property in View Model. The type of property is Thickness. But it is not working. I doubt that CategoricalAxis doesn't support it because I saw an example.

Thanks for advice.

Dilyan Traykov
Telerik team
 answered on 13 Dec 2017
3 answers
236 views

In order to create a Custom editor with RadGridView by following a guide at: Create Custom Editor with RadGridView

It looks OK, but I would change the DataMemberBinding to Int32 instead of System.Windows.Media.Color, because System.Windows.Media.Color belongs to View class I don't really want to use it in my ViewModel. The converter looks like:

public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
      int num= System.Convert.ToInt32(value);
      Color color;
      byte[] bytes = BitConverter.GetBytes(num);
      color = Color.FromArgb(bytes[3], bytes[2], bytes[1], bytes[0]);
      return new SolidColorBrush(color);     
 }

 

The converter get correct value for control, but when I change color from CorlorPicker, it get validation error in the cell and it says: Object of type "System.Windows.Media.Color" cannot be converted to type "System.Int32".

Any idea to resolve the problem? Thanks in advance.

 

Quang Khải
Top achievements
Rank 1
 answered on 13 Dec 2017
4 answers
204 views

I use gridview to display a datatable, when columns count is 2000 and rows count is 100, the UI can not render out,

there is a compromise solution is divide the datatable and display them by many gridview side by side,but when drag the horizontal scroll bar,it is not smooth

How to raise the rendering efficiency of gridview

and is there a probably render limit of the gridview , how many columns and how many rows

 

rui
Top achievements
Rank 1
 answered on 13 Dec 2017
4 answers
197 views

Hi,

I created a little UI that allow user to personalize the GridView properties.

I a section of this UI, a user can add a "Format Condition" defining an Expression (using RedExpressions) and some Style preferences, in example a row background.

When a FormatCondition class is created, in the constructor, I add a StyleRule to GridView.RowStyleSelector, I bind the StyleRuleCondition to FormatCondition.Condition and I'm waiting for BackGround changes:

            Grid = g;
            Css = (ConditionalStyleSelector)(g.RowStyleSelector ?? (g.RowStyleSelector = new ConditionalStyleSelector()));
            StyleRule = new StyleRule();
            StyleRule.Bind(StyleRule.ConditionProperty, Condition, converter: new Converters.FunctionConverter<string, System.Linq.Expressions.Expression>(Convert));
            StyleRule.Style = new System.Windows.Style(typeof(GridViewRow)
, (Style)Application.Current.FindResource("GridViewRowStyle"));
            Css.Rules.Add(StyleRule);
            BackGroundColor.ValueChanged += (p) => ResetBg();

If BackGround change I edit the Background setter:

if (BgSetter != null) Style.Setters.Remove(BgSetter);

BgSetter = null;

if (!BackGroundColor.Value.HasValue) return;

BgSetter = new Setter(GridViewRow.BackgroundProperty, new SolidColorBrush(BackGroundColor.Value.Value));
Style.Setters.Add(BgSetter);

 

I think this is logically correct but Grid Style don't change until a rows refresh occours.

How I can force grid to re-evaluate row stryle rules?

marc.

Marcello
Top achievements
Rank 1
Iron
 answered on 13 Dec 2017
0 answers
116 views
I'am using the HTMLExportHelper example to export my RadDiagram's to HTML and I'am wondering if it would be possible to display scrollbars inside the html diagram when zoomed in. The problem is that a lot of users don't even realize that the Diagram is bigger than whats visible on the screen without scrollbars. Does anyone have an idea if this is even possible with HTML 5?
Davidm
Top achievements
Rank 1
 asked on 12 Dec 2017
1 answer
212 views
Hello Sirs,

I'm using RadVirtualGrid with a Custom DataProvider in which I would like to have a column with buttons. These buttons must have an image and a Click event.
Could you sirs please help me with it?

Thanks in advance,
Stefan
Telerik team
 answered on 12 Dec 2017
2 answers
307 views

When I click the grid view's "add new item" button, it shows a text box where to type in the value for the new row. I want show Window's on screen keyboard when the text box is clicked/tapped. I.e., I start a new Process that starts TabTip.exe for every other text box in my application.

Is there an easy way to do this with the grid view's text box or do I have to override a certain grid view's style? If so, which one?

I took a quick look at the your style structure topic but couldn't find the text box in the styles. I think the text box container is PART_DataCellPresenter because the text box was not displayed after I commented PART_DataCellPresenter out in the style.

The way I have handled this with other text boxes is that I have created a new class that extends TextBox. Then I subscribed to the PreviewLeftMouseUp event whose handler starts TabTip.exe. Maybe I can override some grid view's style to use my extended class or if you have a better solution.

J
Top achievements
Rank 1
 answered on 11 Dec 2017
1 answer
129 views

If I set RadTreeViewItem Background it highlights the header only. How can I highlight the whole line?

Dinko | Tech Support Engineer
Telerik team
 answered on 11 Dec 2017
8 answers
533 views

I have a bar series. I use the default setting. Now I want to customize the margins. See the expected image.

image

Do not worry about the bar color. I only need to set the margins. I have no idea to do it.

If you could post a sample project, that would be great. Thanks.

Trump
Top achievements
Rank 1
 answered on 08 Dec 2017
1 answer
657 views

Is there a simple way to get the text in a RadComboBox and a TextBox to be aligned?  Both controls are aligned but the text within the controls are slightly misaligned.

Thanks,

Bob

 

Sample XAML:

<Window x:Class="AlignmentIssue.MainWindow"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                Title="MainWindow" Height="350" Width="525">
        <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="45" />
            <RowDefinition Height="45" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <telerik:RadComboBox Grid.Column="0"
                             Grid.Row="0"
                             SelectedIndex="0">
            <telerik:RadComboBoxItem Content="Begin Item 1" />
            <telerik:RadComboBoxItem Content="Begin Item 2" />
        </telerik:RadComboBox>

        <TextBox Grid.Column="0"
                 Grid.Row="1"
                 Text="Begin Alignment Test" />

    </Grid>
</Window>

Sia
Telerik team
 answered on 08 Dec 2017
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
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?