Telerik Forums
UI for WPF Forum
4 answers
298 views

I am failry new to telerik and WPF and MVVM, so please forgive my lack on knowledge, I have a Shell that that uses directory searching to find modules that I can load into its regions, Each module has a few views that are have top level elementa radSplitContainer, A few of those views can be opened at one time and each has custom logic when the RapPane is closed

 

What I did was used event aggregation to publish the closed event, but I cant find a way to know what view called the close event without creating a reference to my view inside my viewmodell. I have tried 

 

 private void DockMain_PreviewClose(object sender, Telerik.Windows.Controls.Docking.StateChangeEventArgs e)<br>        {<br>            if (e.Panes != null && e.Panes.Count() > 0 && e.Panes.ToList()[0].GetType() == typeof(RadPane))<br>            {<br>                if (_mainviewmodel != null)<br>                {<br>                    var test = e.Panes.ToList()[0].ParentOfType<RadSplitContainer>();<br>                    var bol = test.GetType().IsAssignableFrom(typeof(IModuleView));<br>                    //var test = e.Panes.ToList()[0].ParentOfType<RadSplitContainer>();<br>                    _mainviewmodel.OnPreviewClose(e.Panes.ToList()[0].ParentOfType<RadSplitContainer>() as IModuleView);//publish teh subscriber event<br>                }<br>            }<br>        }

 

to try and create an interface that both the view and viewModel would implement, but i can never find an object that supports the interface I just created or anyway I can tap into the close event  from the view instead of from the RapDock control.

Mahlatse
Top achievements
Rank 1
 answered on 25 Oct 2016
3 answers
158 views

Is there any example which demonstrates how to create and work with a custom third-party spell checker using Open Office?

I tried https://github.com/telerik/xaml-sdk/tree/8a76eafd48278d8278b4b61d1c2aeb3c0ac8750d/RichTextBox/NHunspellSpellChecking, but it is not working properly (all words are marked as incorrect). I used en_US.aff and en_US.dic files from en_us.oxt (http://extensions.openoffice.org/en/project/us-english-spell-checking-dictionary).

Thanks

Beata

Boby
Telerik team
 answered on 25 Oct 2016
2 answers
241 views
Is it possible to use your components are free for individual developers like syncfusion? For example WPF. Not everyone can buy these components to create a small application.
Seth
Telerik team
 answered on 24 Oct 2016
0 answers
130 views

Hello Telerik,

 

I want to display a ToolTip when mouse passing on specific cell (pink background cell), but I don't find the corresponding event.

 

I tried to use the CurrentCell but it's every time null. After, I tried to use the casted row to use its Properties Item CurrentCell to get attribut ('IsDiscontinuite') but the result it's every time true.

My work :

//Every Time null
if (((RadGridView)sender).CurrentCell.Background == new SolidColorBrush(Color.FromArgb(255, 255, 0, 255)))
 
//Every Time "True"
if (((MesureDynamicRow)((RadGridView)sender).CurrentCellInfo.Item).Properties.First().CoupureHisto)

 

So, I want to know what is the find event for this problem ?

 

Thank you very much !

 

Valentin.

Valentin
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 24 Oct 2016
2 answers
146 views

I would like to handle a double click event on a connector. For shapes there is a OnShapeDoubleClicked, but I can't seem to find a way of handling the double click of an connector.

I tried handling the double-click event of the diagram itself, but can't seem to find the connector at the click location.

Is there an easy way to achieve this?

Roy
Top achievements
Rank 1
 answered on 24 Oct 2016
7 answers
357 views

This is my first time using the masked input and I could use some help. I don't want the placeholder, so I'm using Mask="". In this example, I want to restrict to positive integers only (or blank if it's an optional input). I can restrict the numeric version to digits only, but how do I prevent the negative sign?

I would actually prefer to use the normal masked input and simply limit it to the characters 0-9. However when I use Mask="", I have not been able to restrict the inputs using the FormatString. It's still allowing me to type anything.

Dinko | Tech Support Engineer
Telerik team
 answered on 24 Oct 2016
7 answers
252 views

I have the following exception popping up from time to time when I scroll fast or use sliders in RadGridView.

 

Exception: Exception thrown: 'System.Xaml.XamlParseException' in #####.exe

("Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Telerik.Windows.Controls.GridView.GridViewRow', AncestorLevel='1''. BindingExpression:Path=IsPinned; DataItem=null; target element is 'GridViewPinButton' (Name=''); target property is 'IsPinned' (type 'Boolean')"). Exception thrown: 'System.Xaml.XamlParseException' in #####.exe ("Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Telerik.Windows.Controls.GridView.GridViewRow', AncestorLevel='1''. BindingExpression:Path=IsPinned; DataItem=null; target element is 'GridViewPinButton' (Name=''); target property is 'IsPinned' (type 'Boolean')") 80.33s  [15528] <No Name>

 

I simply host RadGridView in UserControl:

 

    <telerik:RadGridView ItemsSource="{Binding #######}"
                         IsReadOnly="True"
                         RowIndicatorVisibility="Collapsed"
                         AutoGenerateColumns="False"
                         ShowGroupPanel="False"
                         GridLinesVisibility="Both"
                         ClipboardCopyMode="All"
                         SelectionMode="Extended"
                         FrozenColumnCount="1"
                         CanUserFreezeColumns="False"
                         Background="Transparent"
    >
        <telerik:RadGridView.Columns>

....


Dilyan Traykov
Telerik team
 answered on 24 Oct 2016
3 answers
286 views

Hello,

 We are facing this strange issue with PDFViewer.Print functionality on Windows 10 only.

Attached is the sample using latest Telerik dlls (Telerik_UI_for_WPF_2015_2_728_Dev.msi).  The problem is - once we print - it goes into the Printing queue and shows "Spooling" but does not print - rather disappears after some time. Please advise.

 

class Program
{
    /// <summary>
    /// Main method.
    /// </summary>
    /// <param name="args">The args.</param>
    [STAThread]
    static void Main(string[] args)
    {
        string fileName = "CMI9063.pdf";
        if ((args != null) && (args.Length > 0))
        {
            fileName = args[0];
        }
        // Load the PDF file.
        byte[] buffer = LoadPdfFile(fileName) ?? new byte[] { };
        using (MemoryStream stream = new MemoryStream(buffer))
        {
            PrintDialog printDialog = new PrintDialog { UserPageRangeEnabled = true };
            if (printDialog.ShowDialog() == true)
            {
                RadPdfViewer radPdfViewer = new RadPdfViewer { DefaultFormatProviderSettings = FormatProviderSettings.ReadOnDemand };
                radPdfViewer.ClearDocument();
                radPdfViewer.Document = new PdfFormatProvider(stream, FormatProviderSettings.ReadOnDemand).Import();
                radPdfViewer.Print(printDialog, PrintSettings.Default);
 
                //System.Windows.MessageBox.Show("Successfully print to \"" + printDialog.PrintQueue.FullName + "\"", "Print", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Information);
            }
        }
    }
 
 
    private static byte[] LoadPdfFile(string filePath)
    {
        byte[] buffer;
        string folder = Directory.GetCurrentDirectory();
        if (!filePath.StartsWith(folder))
        {
            filePath = Path.Combine(folder, filePath);
        }
 
        //load from physical path
        if (File.Exists(filePath))
        {
            using (FileStream fs = new FileStream(filePath, FileMode.Open))
            {
                buffer = new byte[fs.Length];
                fs.Read(buffer, 0, buffer.Length);
            }
        }
        else
        {
            return null;
        }
 
        return buffer;
    }
}
Deyan
Telerik team
 answered on 24 Oct 2016
4 answers
158 views
If I use CellTemplate and then horizontally scroll so column isn't visible then scroll back I have a noticeable slowdown (jerk) in scrolling.

If I replace this code with using DataMemberBinding without CellTemplate I don't see this problem.

Any advice on how to fix this problem?

(saw some old threads about it but not sure what's the resolution).

Stefan
Telerik team
 answered on 24 Oct 2016
1 answer
110 views

Hi,

i use a RadGridView bound to a ObservableCollection<Calls> with some Columns like Name, Number, Date, Time,...

The Column "Date" ist declared as DateTime in my ViewModel and the Column "Time" is a string. I have to sort my
Collection by Date and Time:

Comin from log:

Prusik#4862416#8:30#20.10.2016#incoming.png#(284,1,0)
Prusik#4862416#8:40#20.10.2016#incoming.png#(284,1,0)
Prusik#4862416#8:50#20.10.2016#incoming.png#(284,1,0)
Golf & Thermenresort Stegersbach GmbH#06803280292#14:00#19.10.2016#incoming.png#(16364,0,0)
Golf & Thermenresort Stegersbach GmbH#06803280292#13:00#19.10.2016#incoming.png#(16364,0,0)

Should be sorted to

Prusik#4862416#8:50#20.10.2016#incoming.png#(284,1,0)
Prusik#4862416#8:40#20.10.2016#incoming.png#(284,1,0)
Prusik#4862416#8:30#20.10.2016#incoming.png#(284,1,0)
Golf & Thermenresort Stegersbach GmbH#06803280292#14:00#19.10.2016#incoming.png#(16364,0,0)
Golf & Thermenresort Stegersbach GmbH#06803280292#13:00#19.10.2016#incoming.png#(16364,0,0)

What is to do to geht thisrunning?

And i also want to insert a new incoming call on top of the RadGridView?

Thanks a lot
Best Regards
Rene

Martin
Telerik team
 answered on 24 Oct 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?