Telerik Forums
UI for WPF Forum
3 answers
84 views
hii
i want to know is it posible to maximize & minimize of my tile view to click on anywhere in tileview. now its is minimize & maximize through button i.e displayed on corner side of tileviewitem but i want to click any where of this particular tileviewitem & perform minimize & maximize it.
Petar Mladenov
Telerik team
 answered on 02 May 2011
2 answers
85 views
In the RadControls for WPF demo app, in the lower left corner is a very handy "Browse Controls" multi-level button. I'm really curious how to replicate that functionality. :)
ResourceJeremy
Top achievements
Rank 1
 answered on 02 May 2011
1 answer
147 views
Hi,
I'm having problems using a convertor on a WPF GridView
I'm trying to set the background colour.
The background sets correctly when I highlight any particular row in the GridView, however all other columns get set to this colour in the entire grid.

e.g. If I Click a row where the person has account balance 0 to 5 (e.g. red) every row goes red in this column
If I click a row where the person has account balance that converts to green every row goes green in this column and so on.

Below is the convertor, class person and XAML from my project.



CONVERTER:
Public Class AccountBalanceToColourConvertor
    Implements IValueConverter


    Public Function Convert(value As Object, targetType As System.Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.Convert
        Dim x As Double
        x = value
        Select Case x
            Case 0 To 5
                Return "Red"
            Case 5.01 To 50
                Return "Orange"
            Case Is > 50
                Return "Green"
        End Select
    End Function


    Public Function ConvertBack(value As Object, targetType As System.Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.ConvertBack
        ' Only is a one way conversion
    End Function
End Class

CLASS PERSON
Public Class Person
    Public Property Forename As String
    Public Property AccountBalance As Double
    Public Enum Gender
        Male = 1
        Female = 2
        Unknown = 3
    End Enum
End Class



XAML

    <Window.Resources>
        <my1:AccountBalanceToColourConvertor x:Key="AccountBalanceToColourConvertor" />
        <CollectionViewSource x:Key="PersonViewSource" d:DesignSource="{d:DesignInstance my1:Person, CreateList=True}" />
    </Window.Resources>
    <Grid DataContext="{StaticResource PersonViewSource}">
        <ComboBox Height="23" HorizontalAlignment="Left" Margin="12,12,0,0" Name="ComboBox1" 
               
                  VerticalAlignment="Top" Width="120" />
        <Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="147,12,0,0" Name="Button1" VerticalAlignment="Top" Width="75" />
        <telerik:RadGridView Height="136" HorizontalAlignment="Left" ItemsSource="{Binding}" Margin="12,62,0,0" Name="PersonRadGridView" VerticalAlignment="Top" Width="352" >
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn  DataMemberBinding="{Binding AccountBalance}"  Header="Account Balance" Width="Auto" DataFormatString="N2"
                                             Background="{Binding Path=AccountBalance, Converter={StaticResource AccountBalanceToColourConvertor}}">


            </telerik:GridViewDataColumn>
          </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</Window>



Ivan Ivanov
Telerik team
 answered on 02 May 2011
1 answer
127 views
I'm trying to hide the item labels on my chart.  There are 52 items on one chart, so the item labels hide the actual line on the chart.  I can't figure out how to turn them off.  The data is generated from the code-behind.  Here is a snippet that shows how I am creating the chart data:

SeriesMapping mySeries = new SeriesMapping();
mySeries.LegendLabel = "Current Year Cash Balance";
mySeries.SeriesDefinition = new SplineSeriesDefinition();
mySeries.SeriesDefinition.Appearance.StrokeThickness = 3;
mySeries.ItemMappings.Add(new ItemMapping("CashBalance", DataPointMember.YValue));
mySeries.ItemMappings.Add(new ItemMapping("Week", DataPointMember.XCategory));
secondaryChart.SeriesMappings.Add(mySeries);
secondaryChart.DefaultSeriesDefinition.ShowItemLabels = false;
 
secondaryChart.ItemsSource = cashBalanceData.Tables["currentCashBalance"];

Is there a simple way to do this?  Demo code would be most appreciated.  I would prefer the option to do it either in the XAML or the code-behind, since I might want to set the default in the XAML but then change it in the code-behind.
Giuseppe
Telerik team
 answered on 02 May 2011
5 answers
412 views
I have a datagrid with a select column.
I want to view RowDetails for selected row on the click of a button.
Can you help in implementing this using MVVM pattern?
Maya
Telerik team
 answered on 02 May 2011
1 answer
72 views
I need to generate graphs on the fly and only when I receive the response will I know what type of graph to generate.

I have been trying for about a hour and cannot figure it out.  What am I doing wrong?  The legend shows the title, but it does not show the legend label that has been associated with each datapoint.  Why?

What am I missing?
           
var chartArea = new ChartArea();
 chartArea.LegendName = "test";
             
 var pieSeries = new DataSeries
 {
     Definition = new PieSeriesDefinition
     {
         InteractivitySettings =
             {HoverScope = InteractivityScope.None,
              SelectionScope = InteractivityScope.Item,
               SelectionMode = ChartSelectionMode.Single
              }
     }
 };
             
 
pieSeries.Definition.ItemLabelFormat = "p";
pieSeries.Add( new DataPoint() { YValue = 0.215208267, LegendLabel = "Toyota" } );
pieSeries.Add( new DataPoint() { YValue = 0.192960612, LegendLabel = "General Motors" } );
pieSeries.Add( new DataPoint() { YValue = 0.151830229, LegendLabel = "Volkswagen" } );
pieSeries.Add( new DataPoint() { YValue = 0.125964366, LegendLabel = "Ford" } );
pieSeries.Add( new DataPoint() { YValue = 0.091152353, LegendLabel = "Honda" } );
pieSeries.Add( new DataPoint() { YValue = 0.079093251, LegendLabel = "Nissan" } );
pieSeries.Add( new DataPoint() { YValue = 0.079093251, LegendLabel = "PSA" } );
pieSeries.Add( new DataPoint() { YValue = 0.064697675, LegendLabel = "Hyundai" } );
             
chartArea.DataSeries.Add(pieSeries);
RadChart1.DefaultView.ChartLegend.UseAutoGeneratedItems = true;
RadChart1.DefaultView.ChartArea = chartArea;
RadChart1.DefaultView.ChartLegend.Header = "Legend test";

            
Giuseppe
Telerik team
 answered on 02 May 2011
1 answer
107 views
Its a defect in RadComboBox. 

1) Create an application 
2) Add RadComboBox in a window
3) in Code file just add one RadComboBoxItem to RadComboBox
4) Override the FontSize property in style something like

<Style TargetType="telerik:RadComboBox">
<Setter Property="FontFamily" Value="{x:Static ui:DefaultStyle.APP_FONT_FAMILY}"/>
<Setter Property="FontSize" Value="10.5"/>
<Setter Property="Height" Value="{x:Static ui:DefaultStyle.COMBO_BOX_HEIGHT}"/>
<Setter Property="telerik:StyleManager.Theme" Value="{x:Static ui:DefaultStyle.APP_THEME}"/>
</Style>

5) Run the application
6) click on radcombobox . Initially item looks blurred. And in few second it gets normal.

It happen only when u have one RadComboBoxItem.

Regards
Sanket
George
Telerik team
 answered on 02 May 2011
5 answers
209 views
How can i remove the border around the linked image.
Vanya Pavlova
Telerik team
 answered on 02 May 2011
2 answers
101 views
The example code uses a generated dbf file, but I need to get data at runtime based, for example "hugs per captia".

I get NaN in the legend when I tried the following code:

public partial class Example : UserControl
    {
        private bool initialized;
        private const string NonDbfDataField = "HugsPerCapita";
  
        public Example()
        {
            InitializeComponent();
            this.RadMap1.InitializeCompleted += new EventHandler(RadMap1_InitializeCompleted);
        }
  
        void RadMap1_InitializeCompleted(object sender, EventArgs e)
        {
            if (!this.initialized)
            {
                this.initialized = true;
                this.InformationLayer.Reader.PreviewReadCompleted += new PreviewReadShapesCompletedEventHandler(Reader_PreviewReadCompleted);
            }
        }
  
        private void Reader_PreviewReadCompleted(object sender, PreviewReadShapesCompletedEventArgs eventArgs)
        {
            if (eventArgs.Error == null)
            {
                foreach (MapShape shape in eventArgs.Items)
                {
                    this.SetAdditionalData(shape);
                }
            }
        }
  
        private void SetAdditionalData(MapShape shape)
        {
            ExtendedData extendedData = shape.ExtendedData;
            if (extendedData != null)
            {
                // add new property to ExtendedData  
                if (!extendedData.PropertySet.ContainsKey(NonDbfDataField))
                {
                    extendedData.PropertySet.RegisterProperty(NonDbfDataField, "", typeof(int), 0);
                }
  
                string country = (string)shape.ExtendedData.GetValue("ISO_2DIGIT");
                int additionalFieldValue = this.GetHugsByCountry(country);
  
                // assign value to new property  
                shape.ExtendedData.SetValue(NonDbfDataField, additionalFieldValue);
                  
            }
        }
  
        private int GetHugsByCountry(string stateName)
        {
            return 43 ; 
        }  
  
          
  
    }
Andrey
Telerik team
 answered on 02 May 2011
2 answers
159 views
Hello All,

   I like the way the default control in RadGridView works - AKA Telerik.Windows.Controls.GridView.FilteringControl.  However, I want to change one behavior; the application of the filter.  Basicly, I want to intercept the filter specified by the user and interpret it myself.  This way I can customize the behavior and keep the look and feel.  Can anyone advise me how to do this?

- Rashad Rivera
Rashad Rivera
Top achievements
Rank 1
 answered on 30 Apr 2011
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?