Telerik Forums
UI for WPF Forum
1 answer
174 views

Hi, 

I have following code: 

<telerik:RadScheduleView >
    <telerik:RadScheduleView.ViewDefinitions >
       <telerik:DayViewDefinition />
       <telerik:WeekViewDefinition />
    </telerik:RadScheduleView.ViewDefinitions>
      <telerik:RadScheduleView.GroupDescriptionsSource>
      <telerik:GroupDescriptionCollection>
          <telerik:DateGroupDescription  />
          <telerik:ResourceGroupDescription ResourceType="_StaffWorkplace" />
      </telerik:GroupDescriptionCollection>
    </telerik:RadScheduleView.GroupDescriptionsSource>
</telerik:RadScheduleView>

How I can hide some resource on certain date?  I tried to use GroupFilter, but it's work fine for me only for DayViewDefinition.

Regards,
Vladimir

Nasko
Telerik team
 answered on 01 Aug 2016
3 answers
137 views
hello,
Am using radchart in my wpf application, my requirement is based on Y axis value i have to set the different color for point marks in same line series chart.
for example am having values from 50 to 100, let say i want to set point mark Redfor values between 50 to 75, and remaining green in the same line series chart area..
 
please help to find the solution...

i have try the below option but it not works,,
foreach (var item in qry)
                    {
                        if(condition)
                        {
                        line.Appearance.Fill = new SolidColorBrush(Colors.Green);
                        }
                        else if (condition)
                        {
                            line.Appearance.Fill = new SolidColorBrush(Colors.Red);
                        }}
i need like this kind of effect in my wpf application ...

http://www.telerik.com/help/wpf/radchart-howto-set-custom-fill-for-pointmarks-depending-on-condition.html

my code below...
******************************
 public void chartmain()
        {
            listStackPanel.Visibility = System.Windows.Visibility.Hidden;
            try
            {
                
                var qry = (from s in SWindow.HBList
                           where (s.User_id.Equals(W.Profile.UserId))
                           orderby s.Test_date ascending
                           select new { s.HB_score, s.Test_date }).ToList();

                if (qry.Count == 0)
                {
                    SMessageBox.MessageBox.ShowInformation("No Records Found...");
                    radChart.Visibility = System.Windows.Visibility.Hidden;
                    listStackPanel.Visibility = System.Windows.Visibility.Hidden;
                }
                else
                {
                    

                   
                    radChart.Visibility = System.Windows.Visibility.Visible;
                    radChart.DefaultView.ChartArea.AxisX.IsDateTime = true;
                    radChart.DefaultView.ChartArea.AxisX.LayoutMode = AxisLayoutMode.Auto;
                    radChart.DefaultView.ChartArea.AxisX.LabelRotationAngle = 45;
                    radChart.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "dd-MMM";

                    DataSeries lineSeries1 = new DataSeries();

                    foreach (var item in qry)
                    {
                        SMessageBox.MessageBox.ShowInformation(item.ToString());
                        lineSeries1.Add(new DataPoint() {
                            YValue = Convert.ToDouble(item.HB_score), XValue = item.Test_date.ToOADate() 
                        
                        });

                       
                    }

                    

                    
                    LineSeriesDefinition line = new LineSeriesDefinition();
                    radChart.DefaultSeriesDefinition = line;

                    line.Appearance.Fill = new SolidColorBrush(Colors.Black);
                    line.Appearance.Stroke = new SolidColorBrush(Colors.DarkGreen);
                    line.Appearance.PointMark.Stroke = new SolidColorBrush(Colors.Black);
                    line.ShowPointMarks = true;
                    line.ShowItemLabels = true;
                    lineSeries1.Definition = line;


                    this.BHGridView.ItemsSource = qry;
                    this.radChart.DefaultView.ChartLegend.Visibility = System.Windows.Visibility.Collapsed;

                     this.radChart.DefaultView.ChartArea.DataSeries.Add(lineSeries1);




                }
            }
            catch (Exception ex) {
                SMessageBox.MessageBox.ShowError(ex.Message);
            }
        }
       

Martin Ivanov
Telerik team
 answered on 01 Aug 2016
1 answer
141 views

I want to have a MarkerBrush based on a property of the data object being bound to. For example,

 

```

class MyDataPoint

{

   public DateTime XValue {get;set;}

   public double YValue {get;set;}

   public bool IsRed {get; set;}

}

```

 

I want all points where IsRed=true to be rendered red, and blue when false. Is it possible? 

I've made a Style with TargetType IndicatorItem and used DataTriggers but the style is always overridden with the default marker colour,

Evgenia
Telerik team
 answered on 29 Jul 2016
2 answers
83 views

Hi, I use a radgridview ,like this:

this.gridUserControl.gridview.ItemsSource = xmlElement.ChildNodes;

add a new dataitem to xmlElement...

this.gridUserControl.gridview.ItemsSource = xmlElement.ChildNodes; //rebinding

int i = gridUserControl.gridview.Items.Count;
XmlElement lastitem = (XmlElement)gridUserControl.gridview.Items[i - 1];
gridUserControl.gridview.SelectedItem = lastitem;
gridUserControl.gridview.BeginEdit();

 

I want to go in the edit status when add a new dataitem directly. It works well. But the problem is that I press any key the first time, the edit status will be ended. And the edit cell's value is the only the press key's value. That's inexplicable. Please help me to solve the problem ,thanks!

Jonathan
Top achievements
Rank 1
 answered on 29 Jul 2016
1 answer
482 views
Dear Telerik-Team,

we have a RadMenu that has bound his data over a ViewModel. Depending on the data we want to generate RadMenuGroupItems or RadMenuItems.
The bound data class is this:

public class MenuItem
    {
        public List<MenuItem> SubItems { get; set; }
        public string Text { get; set; }
        public Type EditUserControlType { get; set; }
        public Action<object> Navigate;
        public int RowIndex { get; set; }
        public int ColumnIndex { get; set; }

        public MenuItem()
        {
            SubItems = new List<MenuItem>();
        }
    }

if the MenuItem has SubItems we want that a RadMenuGroupItem is dynamically created. If the MenuItem has no SubItems we want that a RadMenuItem is created.
Is there a similar way of Item Creation like the dynamic assignemnt of Styles over the property "ItemContainerStyleSelector". We need something called "ItemContainerControlSelector"
but we didn't find anything in the documentation.

Important: We don't want to create the items dynamicalle in code behind of the view. We want to assign this logic via XAML in the View.

How can we do that?

Thanks for your help.

Kind regards
Polya
Telerik team
 answered on 29 Jul 2016
14 answers
555 views
Dear sir,

I am evaluating RadPropertyGrid for my application. 

First, please see a attached image.

I made a property class for the object.

public class MyProperty
{
private ObservableCollection<VideoProfile> videoProfiles;
public string a{ get; set; }
public string b{ get; set; }

public ObservableCollection<VideoProfile> VideoProfiles
        {
get {return videoProfiles;}
}
...
...
}

Than, I could see auto generated VideoProfiles Collection editor in run time.

Question.
1. I want to customize Collection editor style to VideoProfiles. Items section is displaying class path
2. I have referred the document, but It showed only image example about CollectionEditor, Can you give me a sample program about this? (Because it's first time that I develop a wpf application)
3. I want to use DataTemplateSelector to change properties of VideoProfiles. Because I need to show combobox for a property that should be selected in external items.

Best regards,

Stefan Nenchev
Telerik team
 answered on 29 Jul 2016
2 answers
407 views
Hi, I'm wondering how do I change the template such that there's a clear button within the Autocomplete box, something like how the radmaskinput box are.

[Search....           [x]]   <- AutocompleteBox
Nasko
Telerik team
 answered on 29 Jul 2016
1 answer
713 views

Hi I have a datatemplate I would like to apply for the GridViewRow tooltip. May I ask how abouts I would do that?

 

<DataTemplate x:Key="AppointmentToolTipTemplate">
    <Grid MaxWidth="300" Background="White">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="43" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <TextBlock Text="{Binding Subject}" Grid.ColumnSpan="2" TextWrapping="Wrap" Margin="5 8 4 3" FontWeight="Bold" />
        <Button IsEnabled="False" Background="Transparent" Grid.Row="1"  VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5 5 0 0" Width="28" Height="29" ContentTemplate="{StaticResource Calendar.Clock}"></Button>
        <StackPanel Orientation="Vertical" Grid.Column="1" Grid.Row="1" Margin="0 5 0 0">
            <StackPanel Orientation="Horizontal" Margin="0 0 0 0">
                <TextBlock Text="{Binding Start, StringFormat='hh:mm tt', Mode=TwoWay}" TextWrapping="Wrap" FontSize="10" />
                <TextBlock Text=" - " FontSize="10" />
                <TextBlock Text="{Binding End, StringFormat='hh:mm tt', Mode=TwoWay}" TextWrapping="Wrap" FontSize="10" />
            </StackPanel>
            <TextBlock Text="{Binding Start, StringFormat='dddd dd MMM yyyy', Mode=TwoWay}" Margin="0 3" FontSize="10" />
        </StackPanel>
        <TextBlock Grid.Row="2" Grid.ColumnSpan="2" Text="{Binding Body}" Margin="5 3 5 8" TextWrapping="Wrap"  />
    </Grid>
</DataTemplate>
Stefan Nenchev
Telerik team
 answered on 29 Jul 2016
1 answer
341 views

In the lastest version of the GridView, it is now "builtin" that when a user clicks with the right mouse button on a row, it is selected as if the user did a CTRL+Click. I am however not able to disable this behaviour.

We use a context menu on right click and do not want the selected state of a row to change once a user does this. We get a lot of negative feedback about this.

How do I disable this rightclick -> select row behaviour?

Thanks,

Marcel

Marcel
Top achievements
Rank 1
 answered on 29 Jul 2016
3 answers
213 views

Hello,

I want to display a DataForm for enter a new element in a grid. But this grid is generated dynamically.

For that, i use a: "dynamic data = new ExpandoObject()" and feed that with: "data.field1 = "string"; data.field2 = 10" and bind my DataForm on it: "<telerik:RadDataForm x:Name="RadDataForm" AutoGenerateFields="True"
                                     AutoCommit="True" EditEnded="DataForm_OnEditEnded"
                                     AutoEdit="True" CommandButtonsVisibility="Commit,Cancel"
                                     CurrentItem="{Binding Path=DataContext.data, RelativeSource={RelativeSource Self}}"
                                     Header="Hello world"
                                     KeyboardNavigation.TabNavigation="Cycle">
</telerik:RadDataForm>"

My problem now, the DataForm change my Int type on string type...

Have you some idea?

Vivien
Top achievements
Rank 1
 answered on 28 Jul 2016
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
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?