Is there a built-in way to convert from the "{ColumnLetter}{RowNumber}" notation to the CellIndex format?
Example:
"C5" becomes ColumnIndex=2, RowIndex=4
"AA2" becomes ColumnIndex=26, RowIndex=1
It's not the end of the world to write my own conversion, but I was just curious if this is already supported.
Thanks!
I would like to use the 'accent'/'selected' color from my office 2013 implicit theme for a generic control (in my case I am using a Hyperlink inside a TextBlock - I have two of those) in code/xaml to show the selected/unselected color depending on whether the user clicks on one or the other link, i.e. if the user clicks on option 1, I'd like to apply the corresponding color/brush that'd show that it is selected, when the user clicks on option 2, then, I'd like to return option 1 to the default color and have Option 2 switch to the 'selected' one.
I have approached it somehow as follows (I changed the hyperlink to a RadButton hopping that it'd help):
<telerik:RadButton x:Name="ShowDashboardHyperlink" Click="ShowDashboardHyperlink_OnClick" Content="DASHBOARD">
<telerik:RadButton.Style>
<MultiBinding Converter="{StaticResource StyleConverter}">
<MultiBinding.Bindings>
<Binding RelativeSource="{RelativeSource Self}" />
<Binding Path="DashboardStyle" />
</MultiBinding.Bindings>
</MultiBinding>
</telerik:RadButton.Style>
</telerik:RadButton>
With a style converter like:
public class StyleConverter : IMultiValueConverter
{
blah...
}
And on my view model:
public string DashboardStyle
{
get { return _dashboardStyle; }
set
{
_dashboardStyle = value;
RaisePropertyChanged(() => DashboardStyle);
}
}
Somewhere in my constructor I initialize my colors:
DashboardStyle = "AccentMainBrush";
CalendarStyle = "BasicBrush";
It compiles and all but I think the part that I don't get right is the binding.
I'll appreciate any help.
So I am trying to figure out how to change the category of an occurrence. Lets say a custom has an appointment every wednesday at 1pm. When they make the appointment, I will mark that occurrence as Blue. If they miss the appointment, I mark the occurrence as Red.
I was looking at sourcecode of ScheduleView and it seems an occurrence is nothing more then the original appointment with the occurrence start and duration added to the object, which makes up the Occurrence object. So if I change the Category of one,it changes them on all because it is really the same Appointment object with just different dates. So is there anyway to treat an Occurrence like a unique object that you can change Category or properties of, but it still stays part of the RecurrencePattern?
Or is it possible on an appointment, when you call GetOccurrences, the return custom appointments that have more properties?
On an Occurrence, I don't see the different between the appointment and the Master.
My app was developed back in 2013 and I want to implement this behavior now. This behavior was introduced in 2014
http://docs.telerik.com/devtools/wpf/controls/radautocompletebox/features/filteringbehavior.html
I don't want to update Telerik becuase it will mess some other stuff.
Can I implement this ?
Hello - I run a simple system that looks at Sales orders, then with their associated country, changes the colour of that country on a map - pretty simple stuff.
Having that list of countries (shapes), is there a way to zoom so that they act as the zoom limits ie if only UK orders, only UK would be shown via zoom, or if UK and Australia, the map would center somewhere between the two, and zoom accordingly
Many thanks
//add new lookup column |
GridViewLookUpColumn lookUpColumn = new GridViewLookUpColumn(); |
lookUpColumn.HeaderText = "Look up"; |
lookUpColumn.FieldName = "PersonID"; |
lookUpColumn.DataSource = this.employeesBindingSource; |
lookUpColumn.ValueMember = "EmployeeID"; |
lookUpColumn.DisplayMember = "LastName"; |
public class Commodity() |
{ |
public int Id {get;set;} |
public string Description {get;set;} |
public override ToString() |
{ |
return Description; |
} |
} |
public class Price |
{ |
public int Id {get;set;} |
public DateTime Date {get;set;} |
public int CommodityId {get;set;} |
public EntityRef<Commodity> Commodities {get; set;} |
} |
public class AppPresenter |
{ |
public ObservableList<Price> PriceList {get;} |
} |
public class Shell |
{ |
pubic Shell() |
private IList<Commodity> _commodityList; |
{ |
InitializeComponents(); |
_commodityList = repository.GetCommodites(); |
colCommodityEditorSettings = new ComboBoxEditorSettings { ItemsSource = _commodityList}; |
colCommodity.EditorSettings = colCommodityEditorSettings; |
} |
} |
<telerik:RadGridView Grid.ColumnSpan="4" Grid.Row="3" Margin="5" x:Name="radGridView1" ColumnsWidthMode="Auto" ItemsSource="{Binding Path = PriceList}" |
AutoGenerateColumns="False"> |
<telerik:RadGridView.Columns> |
<telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="ID" UniqueName="Id" x:Name="colId" /> |
<telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="Date" UniqueName="Date" IsAutoGenerated="False" IsVisible="True" x:Name="colDate" /> |
<telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="Hidden" UniqueName="IsHidden" x:Name="colIsHidden" /> |
<telerik:GridViewDataColumn DataType="{x:Null}" HeaderText="Commodity" UniqueName="CommodityId" x:Name="colCommodity" DataMemberPath="Commodities.Description"> |
</telerik:RadGridView> |
I would replace the text %Doctors% at the runtime by a table. The following code does not work.
private void ReplaceAllMatches(string Parameter, Telerik.Windows.Documents.Model.Table NewTable)
{
this.myViewer.Document.Selection.Clear(); // this clears the selection before processing
DocumentTextSearch search = new DocumentTextSearch(this.myViewer.Document);
List<Telerik.Windows.Documents.TextSearch.TextRange> rangesTrackingDocumentChanges = new List<Telerik.Windows.Documents.TextSearch.TextRange>();
foreach (var textRange in search.FindAll(Parameter))
{
Telerik.Windows.Documents.TextSearch.TextRange newRange = new Telerik.Windows.Documents.TextSearch.TextRange(new DocumentPosition(textRange.StartPosition, true), new DocumentPosition(textRange.EndPosition, true));
rangesTrackingDocumentChanges.Add(newRange);
}
foreach (var textRange in rangesTrackingDocumentChanges)
{
this.myViewer.Document.Selection.AddSelectionStart(textRange.StartPosition);
this.myViewer.Document.Selection.AddSelectionEnd(textRange.EndPosition);
this.myViewer.InsertTable(NewTable,true);
textRange.StartPosition.Dispose();
textRange.EndPosition.Dispose();
}
}
Is there some way to refresh the colorizer? I've tried setting a MinValue and MaxValue and binding the colorizer's Min and Max values to them but that doesn't work either.
For example, using the sample from WPF SDK for InformationLayerColorizerModeCount (world.shp/world.dbf) , I change the value of the "SQKM" property in the InformationLayerColorizerModeCount event by dividing it by 10. When the map shows, all countries are pretty much the same color. If I divide it by 5, there is more variation in color, but not as much. If I multiply it by 10, than all countries are dark with little or no variation.
Debugging shows me that ColorMeasureScale_PrepareCompleted fires before the PreviewReadShapesCompleted event and apparently sets it range of values from the original DBF values.
I tried to read the shape files in manually ( http://docs.telerik.com/devtools/wpf/controls/radmap/features/information-layer/shapefiles-support) ) , modify the stream, and pass that into the ShapeReader, but the "shapes" do not contain an ExtendedPropertySet so I can't manipulate the values.
StreamResourceInfo shapeResourceInfo = Application.GetResourceStream(new Uri("/InformationLayerColorizerModeCount;component/Resources/world.shp", UriKind.RelativeOrAbsolute));
StreamResourceInfo dbfResourceInfo = Application.GetResourceStream(new Uri("/InformationLayerColorizerModeCount;component/Resources/world.dbf", UriKind.RelativeOrAbsolute));
Telerik.Windows.Controls.Map.ExtendedPropertySet extData = new ExtendedPropertySet();
List<
FrameworkElement
> shapes = new List<
FrameworkElement
>();
var x = ShapeFileReader.Read(shapeResourceInfo.Stream, dbfResourceInfo.Stream);
foreach (var shape in shapes)
{
this.informationLayer.Items.Add(shape);
}
In the foreach loop, I want to grab a value from my model for the specific country, and then either change the value of an existing ExtendedData or create a new one, but the "shape" instance does not have any property that allows me to do this despite the fact that I included the DBF file in the Read method.
Maybe I should use a different technique altogether ? It seems that this requirement would be quite common, i.e. user picks a variable, program colorizes the map according to that variable. What am I missing ?
Thanks