Telerik Forums
UI for WPF Forum
1 answer
173 views

I need to show unpened RadPanel  on event coming form my ViewModel. I tried with RadPanel/RadPanels Content methodes BringIntoView/Focus. But without success. How can i make the radPanel popup from code behind  

Nasko
Telerik team
 answered on 15 Aug 2016
1 answer
161 views
At the moment in my resource dictionary I have a telerik Tile control. When it's instantiated a second time I receive the follow error `Specified Visual is already a child of another Visual or the root of a CompositionTarget`

public void ListIcon()
{
    var tile = Application.Current.Resources["ListTile"] as Tile;       
    Tiles.Add(tile);
}


app.xaml

<telerik:Tile x:Key="Calendar" TileType="Double" Background="#FF79256B" Group="Other">
    <telerik:RadCalendar x:Name="calendar"
                  FontFamily="Segoe UI"
                  FontSize="10"
                  controls:StyleManager.Theme="Windows8"
                  VerticalAlignment="Top" HorizontalAlignment="Center"
                  SelectionMode="Extended"
                  IsTodayHighlighted="True" ViewsHeaderVisibility="Collapsed"                                    
                  SelectedDate="{Binding SelectedDate, Mode=TwoWay}"
                  Culture="en-US"
                  DayTemplateSelector="{StaticResource EventDayTemplateSelector}"/>
</controls:Tile>

 

Everytime a new user is logged in, ListIcon() is called. If I log out and log into a second user the error occurs. May I ask how do I resolve this.

Martin
Telerik team
 answered on 12 Aug 2016
6 answers
1.7K+ views
Hello,

Is it possible to change default behavior of RadGridView so when user press Ctrl+C it is copy current cell value into clipboard not the entire row?

Thanks
Gavin
Top achievements
Rank 1
 answered on 12 Aug 2016
18 answers
925 views
Hi,

I have a Listbox with a datatemplate:
<DataTemplate x:Key="ListBoxDataTemplate">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding FieldName, Mode=TwoWay}" Width="120" />
                <telerik:RadAutoCompleteBox Width="197" Name="autoCompBox"
                        Background="Beige" SelectionMode="Multiple" TextSearchMode="StartsWith"
                        TextSearchPath="Code" AutoCompleteMode="Suggest"
                        DropDownItemTemplate="{StaticResource ContactSearchTemplate}" DataContext="{Binding}"
                        ItemsSource="{Binding DataContext.Codes, Mode=TwoWay, RelativeSource={RelativeSource AncestorType=telerik:RadListBox}}"
                        SelectedItems="{Binding Path=AssociatedCodes, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
                </telerik:RadAutoCompleteBox>
            </StackPanel>
        </DataTemplate>
My ListBox ItemsSource property is binded to a property in ViewModel named:
public List<ReportDataAssociation> ReportDataAssociation
        {
            get { return m_reportDataAssociation; }
            set { m_reportDataAssociation = value; OnPropertyChanged("ReportDataAssociation"); }
        }

This property is an object with the following properties:
string FieldName;
ObservableCollection<ReportCodes> AssociatedCodes;
The FieldName is binded to the TextBlock
The AssociatedCodes is binded to the SelectedItemsProperty of each AutoCompleteBox.

I load an ObservableCollection<ReportCodes> named Codes which is binded to all AutoCompleteBoxes.
The AssociatedCodes is a property of ReportDataAssociation which is binded to SelectedItems.
Any ReportCode I add to the AssociatedCodes' List is from the ObservableCollection<ReportCodes> named Codes
so the referece to the object is the same.

The problem is:
When I select or delete some items from some autocompletebox,
the property AssociatedCodes does not change.
When I change the property AssociatedCodes at runtime, the selectedItems in autocompletebox
don't change.
I think it's a binding problem but i can't figure out what it is.
Maybe because the AutoCompleteBoxes are in a template.

I tried to bind the selectedItems in many ways, the binding shown above is one of my many tries..
Please help
Thanx in advance

Yana
Telerik team
 answered on 12 Aug 2016
3 answers
256 views

Hi telerik support

I have a telerik license for the wpf controls and we are using 2012 version (2012.2.725.40).

Now, i want to try the telerik reports. 

For this i'd created a separate solution (Visual studio solution) which contains 2 projects (one for reporting lib and another one for wpf) which is working fine with no issues.

Now the problem is when i try to integrate with my existing wpf application, what i did as follows

1. Added the ReportLib project to the existing solution

2. Added new window for the report in which added a reportViewer control ( as given by the telerik samples, which is also working fine as i said above)

Now the issue is, Since i'm already using telerik controls inside my application, the report viewer is not showing in the window

Can you please help me, how to resolve this?

NOTE: I'd also tried adding the latest dlls(  Telerik.Windows.Data.dll, Telerik.Windows.Controls.Input,Telerik.Windows.Controls.Navigation, Telerik.Windows.Controls). by doing so, my existing controls are not working (build error)

Katia
Telerik team
 answered on 12 Aug 2016
3 answers
159 views

I know there's probably a simple solution to this problem but I cant find it for the life of me. Im trying to use RadMap in order to display a floor plan that I can later add points to similar to the demo shown here. The issue that im facing is that I cant get the Floor plan to appear. Ive tried using different images with different sizes and that has yet to yield any results when I run it I simply see a blank canvass with the coordinates. The floor plan is saved as a FloorMap.png and for now I have placed it in my desktop. I was not sure how to set the GeoBounds so I have left them as they appear in the sample used here

<UserControl x:Class="testingxaml.MainPage"
            HorizontalAlignment="Center" VerticalAlignment="Center"
             mc:Ignorable="d" d:DesignWidth="625" d:DesignHeight="629">
    <Grid x:Name="LayoutRoot">
 
        <telerik:RadMap x:Name="xRadMap"
                        NavigationVisibility="Collapsed"
                        ZoomBarVisibility="Collapsed"
                        CommandBarVisibility="Collapsed"
                        Center="42.72481708629, 23.3176519378416">
             
                         
            <telerik:RadMap.Provider>
                <telerik:UriImageProvider GeoBounds="42.786, 23.17, 25, 14" Uri=file:///C:/Users/*****/Desktop/FloorMap.png/>
            </telerik:RadMap.Provider>
        </telerik:RadMap>
    </Grid>
</UserControl>

 

Petar Mladenov
Telerik team
 answered on 12 Aug 2016
1 answer
134 views
Re-styling the PropertyGridField style by setting the RadPropertyGrid.FieldStyle property will cause the RadPropertyGrid.OnFieldLoaded to be called twice for each property instead of once when no custom style is specified.
Stefan
Telerik team
 answered on 12 Aug 2016
2 answers
411 views

Hi!

I must use FontAwesome in Telerik GridView for WPF - does anyone know how to do it?

FontAwesome: http://fontawesome.io/

 

Beste regards to all!

m@rko

Stefan Nenchev
Telerik team
 answered on 12 Aug 2016
3 answers
365 views
Hi telerik,

I have 2 raddatepicker which are STARTDATE and ENDDATE. My business logic constraint is START DATE must less or equal to END DATE. Now, I'm using SelectableDateStart and SelectableDateEnd property to validate selected date and it works fine. My problem is this method can't handle if user input Date by key-in.

How to disable "Key-in" function ?

My XAML :
<telerik:RadDatePicker x:Name="startDate" SelectableDateEnd="{Binding ElementName=endDate, Path=SelectedDate }" />
  
<telerik:RadDatePicker x:Name="endDate" SelectableDateStart="{Binding ElementName=startDate, Path=SelectedDate }" />

Please give me some advice , thank you

SweNz
Bairong
Top achievements
Rank 1
 answered on 11 Aug 2016
1 answer
62 views

Hi,

The line

RtbEditor.ChangeStyleName(style.Name, true);

Works perfectly when Track Changes is disabled. When it is enabled and there are tracked changes in the current paragraph, it works for the first time, but the next time it crashes with the exception

System.ArgumentNullException
Message "Value cannot be null.\r\nParameter name: owner"
   at Telerik.Windows.Documents.Model.Styles.DocumentElementPropertiesBase.SetDocumentElementOwner(DocumentElement owner)
   at Telerik.Windows.Documents.Model.Styles.ParagraphProperties.SetDocumentElementOwner(DocumentElement owner)
   at Telerik.Windows.Documents.Model.Styles.DocumentElementPropertiesBase..ctor(DocumentElement owner)
   at Telerik.Windows.Documents.Model.Styles.ParagraphProperties..ctor(DocumentElement owner)
   at Telerik.Windows.Documents.Model.Styles.ParagraphProperties.CreateInstance()
   at Telerik.Windows.Documents.Model.Styles.DocumentElementPropertiesBase.CopyPropertiesFrom(DocumentElementPropertiesBase fromProperties)
   at Telerik.Windows.Documents.Model.Styles.ParagraphProperties.CopyPropertiesFrom(DocumentElementPropertiesBase fromProperties)
   at Telerik.Windows.Documents.Commands.Styles.Paragraphs.ClearParagraphFormattingCommand.GetPropertyValue(Paragraph paragraph)
   at Telerik.Windows.Documents.Commands.Styles.Paragraphs.ChangeParagraphStyleCommandBase`2.PreserveStateBeforeExecute(TContext context)
   at Telerik.Windows.Documents.Commands.UndoableDocumentCommandBase`1.OnExecuting(DocumentCommandContextBase context)
   at Telerik.Windows.Documents.Commands.DocumentCommandBase`1.Execute(DocumentCommandContextBase context)
   at Telerik.Windows.Documents.Model.RadDocumentEditor.ExecuteChangeStyleNameCommand(StyleType type, String styleName)
   at Telerik.Windows.Documents.Model.RadDocumentEditor.ChangeStyleName(String styleName, Boolean useLinkedStyle)
   at Telerik.Windows.Controls.RadRichTextBox.ChangeStyleName(String styleName, Boolean useLinkedStyle)

 

I've made a workaround

var spanstyle = style.LinkedStyle;
var selection = RtbEditor.Document.Selection;
if (!selection.IsEmpty)
    foreach (var span in selection.GetSelectedBoxes<SpanLayoutBox>().Select(x => x.AssociatedSpan).Distinct().ToList())
        span.Style = spanstyle;
else
{
    var paragraph = RtbEditor.Document.CaretPosition.GetCurrentParagraphBox().AssociatedParagraph;
    if (paragraph != null)
        foreach (var span in paragraph.Inlines.OfType<Span>().ToList())
            span.Style = spanstyle;
}

 

And it seams to be working, but it is kind of hacking.

 

I'm using version 2016.1.112.45 and haven't tested with the latest one as I don't have time to test if everything else works after the upgrade.

 

Regards,

Daniel

 

 

Tanya
Telerik team
 answered on 11 Aug 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
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?