Telerik Forums
UI for WPF Forum
3 answers
540 views
Hi,

I need to change the selected data template based on the state of the view model(the binding)
Here is my Xaml
(the content always point to "MainViewModel")

<telerik:RadTransitionControl

Name="radTransitionControl1"

ContentTemplateSelector="{StaticResource pageTemplateSelector}"

Transition="{Binding Transition}"

Content="{Binding}">

 

</telerik:RadTransitionControl>


Thanks in advance
Ramon
Top achievements
Rank 1
 answered on 20 Mar 2014
3 answers
470 views

0
down vote

I am very new to RadCartesianChart.I created a chart in wpf using below code.I got empty screen when i execute.I want to add any property in RadCartesianChart.HorizontalAxis or RadCartesianChart.VerticalAxis .Am I missed anything.Please help me.

<Window x:Class="LineChart.TwoVerticalAxes"
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="TwoVerticalAxes" Height="300" Width="300">
<Grid>
<telerik:RadCartesianChart>
<telerik:RadCartesianChart.HorizontalAxis>
<telerik:CategoricalAxis />
</telerik:RadCartesianChart.HorizontalAxis>

<telerik:RadCartesianChart.VerticalAxis>
<telerik:LinearAxis Maximum="100" ElementBrush="Orange"/>
</telerik:RadCartesianChart.VerticalAxis>
<telerik:RadCartesianChart.Series>
<telerik:LineSeries Stroke="Orange" StrokeThickness="2">
<telerik:LineSeries.DataPoints>
<telerik:CategoricalDataPoint Value="20"/>
<telerik:CategoricalDataPoint Value="40"/>
<telerik:CategoricalDataPoint Value="35"/>
<telerik:CategoricalDataPoint Value="40"/>
<telerik:CategoricalDataPoint Value="30"/>
<telerik:CategoricalDataPoint Value="50"/>
</telerik:LineSeries.DataPoints>
</telerik:LineSeries>

<telerik:LineSeries Stroke="Blue" StrokeThickness="2">
<telerik:LineSeries.VerticalAxis>
<telerik:LinearAxis HorizontalLocation="Right" ElementBrush="Blue" />
</telerik:LineSeries.VerticalAxis>
<telerik:LineSeries.DataPoints>
<telerik:CategoricalDataPoint Value="30"/>
<telerik:CategoricalDataPoint Value="20"/>
<telerik:CategoricalDataPoint Value="15"/>
<telerik:CategoricalDataPoint Value="50"/>
<telerik:CategoricalDataPoint Value="20"/>
<telerik:CategoricalDataPoint Value="60"/>
</telerik:LineSeries.DataPoints>
</telerik:LineSeries>
</telerik:RadCartesianChart.Series>
</telerik:RadCartesianChart>
</Grid>
</Window>
Martin Ivanov
Telerik team
 answered on 20 Mar 2014
4 answers
531 views
How to set CellStyle with Auto Generated Columns?

CellStyle is usually set within GridViewDataColumn <t:GridViewDataColumn CellStyle="{StaticResource MyCellStyle}"

But what if AutoGenerateColumns is set to true?

I tried in code behind but couldn't find what to cast the object FindResouce returns to:

        private void GridViewDataControl_OnDataLoading(object sender, GridViewDataLoadingEventArgs e)
        {
            var rgv = sender as RadGridView;
            if (rgv == null) return;
            foreach (var col in rgv.Columns)
            {
                col.CellStyle = FindResource("MyCellStyle") as ?
            }
        }
Dean
Top achievements
Rank 1
 answered on 20 Mar 2014
9 answers
234 views
Hello,

We are having a situation where the ContextMenu property for the RadRichTextBox is showing as null.  What would cause this?  Could this be from assembly reference issues?  We have one application that is working and another that is not even though they are running the same code/xaml from a shared assembly.

Thanks,
Wil
Wil
Top achievements
Rank 1
 answered on 20 Mar 2014
1 answer
171 views
I'm certain I've seen a forum post on this topic before but I've been unable to track it down again so sorry for any duplication. 

I have a bar chart that shows several different series with one numerical and one categorical  axis. Is it possible to hide a category on the CategoricalAxis in a similar way that hiding series is possible, without have to rebuild the chart from scratch excluding the "hidden" data?

Thanks,

Andy.
Martin Ivanov
Telerik team
 answered on 20 Mar 2014
1 answer
79 views
Hello;

I am using the telerik FluidContentControl to define a dashbaord with different tiles. In my requirement, I need to  set the header of small and medium views with the short descripton of a translatbale string and the header of large view with the long description.

Is it possible to do this ?
I tried to used selectors, but without any success.
Thanks for your help
Sam
Boris
Telerik team
 answered on 20 Mar 2014
2 answers
3.0K+ views
Hi,

I'm experiencing some issues with Observablecollection<T> bound to the RadGridView.
As long as I'm inserting or deleting items in the Collection it updates just fine, but if I try to
update an item with a new value, the GridView doesn't do anything.

What I have is this:

ObservableCollection(OverviewData) ocOverviewData = new ObservableCollection(OverviewData);

which I then bind to the grid using
rgvItems.ItemSource = ocOverviewData;

When an update occurs it's just a simple iteration over the Collection like this:

foreach(OverviewData d in ocOverviewData)
{
    if(d.ReceiverName != newValue)
{
   d.ReceiverName = newValue;
}
}

The object looks like this:
public class OverviewData : INotifyPropertyChanged
{
    private string _ReceiverName;
    public string ReceiverName
    {
        get { return _ReceiverName; }
        set
        {
            if (_ReceiverName == value)
                return;                _ReceiverName = value;
            OnPropertyChanged(new PropertyChangedEventArgs("ReceiverName"));
        }
    }        private string _ReceiverAddress;
    public string ReceiverAddress
    {
        get { return _ReceiverAddress; }
        set
        {
            if (_ReceiverAddress == value)
                return;                _ReceiverAddress = value;
            OnPropertyChanged(new PropertyChangedEventArgs("ReceiverAddress"));
        }
    }        public event PropertyChangedEventHandler PropertyChanged;
    public void OnPropertyChanged(PropertyChangedEventArgs e)
    {
        if (PropertyChanged != null)
            PropertyChanged(this, e);
    }
}

Yet, if I update any value in the observablecollection, as previously mentioned, nothing updates in the UI of the grid.
The main reason I use observablecollection is to have the grid update only the items and properties needed, not rebind
the whole grid (which can be a couple of 1000 items at a time) which would ruin the grouping, sorting and so on and incur
a break in the work process for the people using the program.

How can I make the gridview update on value changes in the items?

Thanks in advance. :)

//Johannes

Yoan
Telerik team
 answered on 20 Mar 2014
1 answer
175 views
Hi

Is it possible to increase thickness of the rectangle which appears when a RadDiagramShape is selected (The rectangle with thumbs at the corners).

Regards
Jeevan
Petar Mladenov
Telerik team
 answered on 20 Mar 2014
7 answers
1.0K+ views
I am using a DatePicker as follows;

<telerik:RadDatePicker Name="dtpPublished"
    Margin="2"  
    Grid.Row="2"
    Grid.Column="1"
    HorizontalAlignment="Left"
    HorizontalContentAlignment="Left"
    VerticalAlignment="Center"
    MinWidth="500"
    MaxWidth="500"
    DateTimeWatermarkContent="Leave blank or enter the date this Scenario was published"
    SelectedDate="{Binding Path=PublishedDt, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}">
</telerik:RadDatePicker>

In the code behind I am setting the Culture and date format as follows;

With dtpPublished
    .Culture = New System.Globalization.CultureInfo("en-AU")
    .Culture.DateTimeFormat.ShortDatePattern = "d-MM-yyyy"
    .Culture.DateTimeFormat.ShortTimePattern = "hh:mm"
 
    .Culture.DateTimeFormat.LongDatePattern = "ddd, d MMM yyyy"
    .Culture.DateTimeFormat.LongTimePattern = "h:mm:ss tt"
 
    .DisplayFormat = Telerik.Windows.Controls.DateTimePickerFormat.Long
End With

My problem is if I clear the displayed date by pressing delete when the date text is highlighted I want the control to update the source as if a date wasn't entered.  Effectively it should set the source to Nothing or to Date.MinValue.  Even after I Tab off the control the source isn't updated?

Preferably the control should display a blank entry rather than "1/01/0001" as the date.
Kalin
Telerik team
 answered on 20 Mar 2014
2 answers
205 views
Hello. I decided to create my own DocumentPane based on RadDocumentPane. Then I tried to save and load RadDocking layout. Saving layout operation works good, but loading layout operation gives me a error:

​Specified argument was out of the range of valid values.
Parameter name: elementTypeName

How can I load layout with my custom documentPanes?
Sergey
Top achievements
Rank 1
 answered on 20 Mar 2014
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?