Telerik Forums
UI for WPF Forum
3 answers
1.4K+ views
I have an docking control and adding panes dynamically. But "Loaded" events of the controls called twice. Am I doing something wrong ?
Here's the XAML:

<Telerik:RadDocking Grid.Row="1" Name="xamDockManager1">  
            <Telerik:RadSplitContainer InitialPosition="DockedBottom">  
                <Telerik:RadPaneGroup> 
                    <Telerik:RadDocumentPane Header="Mesajlar" CanUserPin="True" CanFloat="False" CanUserClose="False" IsPinned="False" > 
                        <TextBox Style="{StaticResource StyleTextBoxMessages}" AutoWordSelection="True" Name="TextBoxMessages" HorizontalAlignment="Stretch"  VerticalAlignment="Stretch"  HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Margin="0" IsReadOnly="True">  
                            <TextBox.ContextMenu> 
                                <ContextMenu Name="MenuItemMessages">  
                                    <MenuItem Name="MenuItemMessagesClear" Click="MenuItemMessagesClear_Click" Header="Temizle"></MenuItem> 
                                    <MenuItem Name="MenuItemMessagesSave" Click="MenuItemMessagesSave_Click"  Header="Kaydet"></MenuItem> 
                                </ContextMenu> 
                            </TextBox.ContextMenu> 
                        </TextBox> 
                    </Telerik:RadDocumentPane> 
                </Telerik:RadPaneGroup> 
            </Telerik:RadSplitContainer> 
              
            <Telerik:RadDocking.DocumentHost> 
                <Telerik:RadSplitContainer> 
                    <Telerik:RadPaneGroup Name="documentPaneGroup" SelectionChanged="documentPaneGroup_SelectionChanged">  
                    </Telerik:RadPaneGroup> 
                </Telerik:RadSplitContainer> 
            </Telerik:RadDocking.DocumentHost> 
        </Telerik:RadDocking> 

Here's the code to add a pane:
public RadPane AddPane(UserControl control, bool canBeClosed = true)  
        {  
            RadPane contentPane = new RadPane();  
            contentPane.Content = control;  
            //contentPane.Header = control.Title;  
            contentPane.IsSelected = true;  
            contentPane.CanFloat = false;  
            contentPane.CanUserPin = false;  
 
            documentPaneGroup.AddItem(contentPane, Telerik.Windows.Controls.Docking.DockPosition.Center);  
 
            return contentPane;  
        } 

Does this mean a control embedded in a RadPane loaded twice ?
Miroslav Nedyalkov
Telerik team
 answered on 23 Apr 2013
1 answer
116 views
Hi 

I have a MaskedTextInput with the following settings

<telerik:RadMaskedTextInput Style="{StaticResource SingleLineTextInputWithNoMask}" Value="{Binding Value}" />

and its style

<Style x:Key="SingleLineTextInputWithNoMask" TargetType="{x:Type telerik:RadMaskedTextInput}" >
    <Setter Property="IsClearButtonVisible" Value="False" />
    <Setter Property="InputBehavior" Value="Insert" />
    <Setter Property="Mask" Value="" />
    <Setter Property="AcceptsReturn" Value="False" />
</Style>

When a user mark the text content and hit CTRL-X a mask like _________ is shown and then it is impossible to paste again text to that MaskedTextInput, which I think is a bug

I am using RadControls for WPF controls with version 2013.1.403.40

Cheers
Laurent Kempé
Pavel R. Pavlov
Telerik team
 answered on 23 Apr 2013
1 answer
174 views
Hi!

Working with radchart I face with the problem that after I refresh the page (on which is my chart)  it's Y axis is strange.

My XAML:
<telerik:RadChart x:Name="durationChart" ItemsSource="{Binding DurationChart, Mode=TwoWay}">
    <telerik:RadChart.SeriesMappings>
        <telerik:SeriesMapping LegendLabel="Devices">
            <telerik:SeriesMapping.SeriesDefinition>
                <telerik:BarSeriesDefinition></telerik:BarSeriesDefinition>
            </telerik:SeriesMapping.SeriesDefinition>
            <telerik:SeriesMapping.ItemMappings>
                <telerik:ItemMapping DataPointMember="Label" FieldName="Value"></telerik:ItemMapping>
                <telerik:ItemMapping DataPointMember="YValue" FieldName="Value"></telerik:ItemMapping>
                <telerik:ItemMapping DataPointMember="XCategory" FieldName="Label"/>
            </telerik:SeriesMapping.ItemMappings>
        </telerik:SeriesMapping>
    </telerik:RadChart.SeriesMappings>
</telerik:RadChart>

Code-behind (declared in the constructor):
#region Duration Chart
 // Hide legend
 durationChart.DefaultView.ChartLegend.Visibility = Visibility.Collapsed;
 
 // Axis titles
 durationChart.DefaultView.ChartArea.AxisX.Title = MOD_COM_HLP.LocalizationHelper.LocalizeString(ResourceKeys.DLYPlantDelaysDurationXAxisResourceKey);
 durationChart.DefaultView.ChartArea.AxisY.Title = MOD_COM_HLP.LocalizationHelper.LocalizeString(ResourceKeys.DLYPlantDelaysDurationYAxisResourceKey);
 
 // X axis
 durationChart.DefaultView.ChartArea.AxisX.AxisLabelsVisibility = Visibility.Visible;
 durationChart.DefaultView.ChartArea.AxisX.PlotAreaAxisLabelsVisibility = Visibility.Visible;
 
 // Y axis
 durationChart.DefaultView.ChartArea.AxisY.AxisLabelsVisibility = Visibility.Visible;
 durationChart.DefaultView.ChartArea.AxisY.MajorTicksVisibility = Visibility.Visible;
 durationChart.DefaultView.ChartArea.AxisY.MinorTicksVisibility = Visibility.Hidden;
 #endregion

My binded OC for feeding the chart:
ObservableCollection<DLYChartPoint> durationChart = new ObservableCollection<DLYChartPoint>();

My refresh function does nothing more than clear the OC and rewrite the data for feed my chart:
private void FillDurationChart()
        {
            // Aux values
            List<LPD_COM_ENT.AUXValue> dlyDurationChartPeriods = lPDModulesLibraryProxy.ReadAUXValues(new LPDModulesLibrary.Common.Entities.ReadFilter() { VariableName = "DLY_DURATION_CHART_PERIOD"});
 
            if (Items == null) return;
 
            // Clear the chart
            DurationChart.Clear();
 
            // Add the columns
            foreach (LPD_COM_ENT.AUXValue variable in dlyDurationChartPeriods) {
                DLYChartPoint point = new DLYChartPoint() {Label = variable.CharValue, Value=0, UniqueId=variable.ValueSeq };
                DurationChart.Add(point);
            }
 
            // Fill chart
            foreach (DLYDelay stoppage in Items)
            {
                double duration = (stoppage.EndDelay - stoppage.StartDelay).TotalSeconds;
 
                foreach (LPD_COM_ENT.AUXValue variable in dlyDurationChartPeriods) {
                    if (duration >= variable.IntegerValue && duration < variable.FloatValue) {
                        DurationChart[(int)variable.ValueSeq].Value++;
                    }
                }
            }
        }

Thanks for all your replies.

Luka
Missing User
 answered on 23 Apr 2013
1 answer
223 views
I was trying to switch over to the DragDropManager today as the builds are now showing the previous manager is obsolete. (Moving to 2013 Q1 SP1).

It all looks straight forward as I use DragInitialize to setup for the drag and then watch GiveFeedback to see what DragDropEffects are being passed back by a valid drop target below what I am dragging (cursor).

Put simply, I can drag all over my app's window and see DragDropEffects.Copy always being returned. Except for a few limited cases, e.g., dragging over a standard WPF text box or the app title bar, or a window outside my app. In the latter cases, I get DragDropEffects.None - as expected!

I must be missing something. I have a custom class as the payload being dragged. I even set it so automatic conversions are not allowed. How are the window's in my app returning the DragDropEffects.Copy effect when they should have absolutely no idea as to how to interpret the payload?

Is it because I have mixed old and new drag/drop methodologies? Is this an error on my part, or the new implementation?

I really want the app to show the cursor associated wth DragDropEffects.None until it is over a target that recognizes the payload type.

Any suggestions appreciated.
Rosen Vladimirov
Telerik team
 answered on 23 Apr 2013
8 answers
221 views
Hello, I am using Telerik WPF RadControls for generating the PDF417 barcode image. I need to specify the number of barcode image columns and rows. The code I am using is following:

<telerik:RadBarcodePDF417 Name="barcode1" Width="480" Height="152" HorizontalAlignment="Left"  >
</telerik:RadBarcodePDF417>

Some other solutions I tested have properties like "NumberOfRows" and "NumberOfColumns". I would like to know whether it is possible to adjust that with RadControls.

 Please help. Thank you.
Yavor
Telerik team
 answered on 23 Apr 2013
6 answers
212 views
I can set the theme for the whole app, but can I for a usercontrol?
danparker276
Top achievements
Rank 2
 answered on 23 Apr 2013
3 answers
1.1K+ views
Is it possible to initialize NumericUpDown with null, so that the NullValue is shown when the NumericUpDown is shown first time?
NullValue is shown correctly when a user deletes the content of the NumericUpDown, but when I initialize the view model's property with null NumericUpDown shows 1 (my minimal value).

My XAML code is the following:
<t:RadNumericUpDown ValueFormat="Numeric" Minimum="1" Maximum="6"
NumberDecimalDigits="0" IsInteger="True" IsEditable="True"
Value="{Binding Priority, UpdateSourceTrigger=PropertyChanged}" Margin="4"
NullValue="None"></t:RadNumericUpDown>
Vladi
Telerik team
 answered on 22 Apr 2013
0 answers
46 views
Filter Dialog Presentationproblem in Windows 7 with "Filter" and "Clear Filter" - Buttons.

Please look the attached file.
Peter
Top achievements
Rank 1
 asked on 22 Apr 2013
11 answers
351 views
Hello Forum

I have a RadGridView with two columns. One ComboboxColumn, and one other column. Lets say i have two rows in that grid as well. Whenever i change a value in the Grid, a Calculation is triggered. This calculation can change all the values in my two rows and columns.

Notice: Changing the value in the ComboboxColumn in Row1 can / does effect the value in the ComboboxColumn in Row2.

This works fine for all the column types i have tried, except the combobox column. The Combobox will not get updated until i edit a value in the same row, which is too late.

My ComboboxColumn definition looks like that:

<telerik:GridViewComboBoxColumn Header="Antriebsart"
     ItemsSourceBinding="{Binding Field[ANTRIEB].ProposedValues}"
     DataMemberBinding="{Binding Field[ANTRIEB].Value}" />

By searching the documentation and the forums for a solution i have found that there seems to be a difference between ItemsSourceBinding and ItemsSource. Without understanding the difference i have tried using ItemsSource as well, but this did not show any of my "ProposedValues" in the Combobox. Could this be because of the Indexer "Field[ANTRIEB].ProposedValues?

Additional Info: The Cells not being updated are readonly, i have not tested with "not readonly" cells. But they get updated when i edit another cell in the same row and with other columns, the readonly does not affect (avoid) the update.

Thanks in advance
Michael
Michael
Top achievements
Rank 1
 answered on 22 Apr 2013
7 answers
275 views
Hello,

   I'm binding a gridview to a DataTable whith 3 columns A,B,Total, where total is A+B.

   When Cell A or B is changed I update the DataTable using a class that Notifies the propertychanged.

   If I use the default DataGrid from WPF the column Total, is updated accordingly, but when I use the RagGridView, it's not updated. In order to have it updated I have to create a button and call the rebind method. (If I call the rebind whithin the CellEditEnded handler I get into an infitinte recursive loop; if I add a boolean to avoid this, I get exceptions...)

   How would be the way to get this working ? Which means how to update Sum column if A or B has been modified, acknowledging the business logic is managed within the class generating/updating the DataTable.

Thanks for your answer.

          private void gridView_CellEditEnded(object sender, Telerik.Windows.Controls.GridViewCellEditEndedEventArgs e)
       {
           if (!e.OldData.Equals(e.NewData))
           {
               this.DataProvider.Refresh();
           }
       }
       private void Button_Click(object sender, RoutedEventArgs e)
       {
           this.gridView.Rebind();
       }



  
Rossen Hristov
Telerik team
 answered on 22 Apr 2013
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
Security
VirtualKeyboard
HighlightTextBlock
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?