or
<
telerik:RadListBox
x:Name
=
"ContentItemsControl"
ItemTemplate
=
"{StaticResource GoalSimpleViewTemplate}"
ItemsSource
=
"{Binding Path=ItemsSource, ElementName=MainControl }"
SelectedItem
=
"{Binding Path=SelectedItem, ElementName=MainControl }"
>
</
telerik:RadListBox
>
<
ListBox
x:Name
=
"ContentItemsControl"
ItemTemplate
=
"{StaticResource GoalSimpleViewTemplate}"
ItemsSource
=
"{Binding Path=ItemsSource, ElementName=MainControl }"
SelectedItem
=
"{Binding Path=SelectedItem, ElementName=MainControl }"
>
</
ListBox
>
public
class
MainViewModel : BaswViewModel, INavigationAware
{
private
QueryableDataServiceCollectionView<Goal> _goals;
private
Goal _selectedGoal;
private
bool
_isGoalsBusy =
true
;
public
MainViewModel(IEventAggregator eventAggregator, IRegionManager regionManager, IConnectionService connectionController, IOptionsService optionsService)
:
base
(eventAggregator, regionManager, connectionController, optionsService)
{
}
public
IEnumerable<Goal> Goals
{
get
{
return
IsGoalsBusy ?
null
: _goals; }
}
public
bool
IsGoalsBusy
{
get
{
return
_isGoalsBusy; }
set
{
if
(_isGoalsBusy != value)
{
_isGoalsBusy = value;
RaisePropertyChanged(
"IsGoalsBusy"
);
}
}
}
public
Goal SelectedGoal
{
get
{
return
_selectedGoal; }
set
{
if
(_selectedGoal != value)
{
_selectedGoal = value;
RaisePropertyChanged(
"SelectedGoal"
);
}
}
}
public
bool
IsNavigationTarget(NavigationContext navigationContext)
{
SelectedGoal =
null
;
SelectedActivity =
null
;
return
true
;
}
public
void
OnNavigatedFrom(NavigationContext navigationContext)
{
}
public
void
OnNavigatedTo(NavigationContext navigationContext)
{
}
protected
override
void
OnModelChanged()
{
base
.OnModelChanged();
if
(Context !=
null
)
{
UIDispatcher.BeginInvoke(() => { Initialize(); });
}
}
private
void
Initialize()
{
_goals =
new
QueryableDataServiceCollectionView<Goal>(Context, Context.Goals);
_goals.PropertyChanged +=
this
.OnGoalsViewPropertyChanged;
_goals.LoadedData +=
this
.OnGoalsViewLoadedData;
_goals.PageSize = 10;
_goals.AutoLoad =
true
;
RaisePropertyChanged(
"Goals"
);
}
private
void
OnGoalsViewPropertyChanged(
object
sender, PropertyChangedEventArgs e)
{
if
(e.PropertyName ==
"IsBusy"
)
{
this
.IsGoalsBusy = _goals.IsBusy;
}
}
private
void
OnGoalsViewLoadedData(
object
sender, LoadedDataEventArgs e)
{
if
(e.HasError)
{
e.MarkErrorAsHandled();
}
}
}
}
<
Telerik:RadGridView
x:Name
=
"grdTableData"
Grid.Row
=
"1"
TabIndex
=
"6"
ShowInsertRow
=
"True"
CanUserSortColumns
=
"False"
ActionOnLostFocus
=
"None"
ColumnWidth
=
"*"
FontSize
=
"12"
Margin
=
"5"
SelectionMode
=
"Single"
BorderThickness
=
"1"
IsFilteringAllowed
=
"False"
ShowGroupPanel
=
"False"
BorderBrush
=
"Black"
AutoGenerateColumns
=
"True"
AlternationCount
=
"2"
RowEditEnded
=
"grdTableData_RowEditEnded"
AutoGeneratingColumn
=
"grdTableData_AutoGeneratingColumn"
>
</
Telerik:RadGridView
>
public
partial
class
MainWindow : Window
{
DataTable dt =
new
DataTable();
DataTable emptyDT =
new
DataTable();
public
MainWindow()
{
InitializeComponent();
emptyDT.Columns.Add(
"Hidden"
);
emptyDT.Columns.Add(
"Lookup"
);
grdTableData.ItemsSource = emptyDT.DefaultView;
dt.Columns.Add(
"Hidden"
);
dt.Columns.Add(
"Lookup"
);
grdTableData.ItemsSource = dt.DefaultView;
}
private
void
grdTableData_RowEditEnded(
object
sender, Telerik.Windows.Controls.GridViewRowEditEndedEventArgs e)
{
ReadDataPage();
}
private
void
ReadDataPage()
{
// clear grid
grdTableData.ItemsSource = emptyDT.DefaultView;
// repopulate grid
grdTableData.ItemsSource = dt.DefaultView;
}
private
void
grdTableData_AutoGeneratingColumn(
object
sender, Telerik.Windows.Controls.GridViewAutoGeneratingColumnEventArgs e)
{
if
( e.Column.Header.ToString() ==
"Hidden"
)
e.Column.IsVisible =
false
; // <---- COMMENT THIS and it works.
}
}
Hi,
Changing Themes is one of the requirement in our project.
Reviewing the below link for the changing the Themes at runtime, but do not find the any Theme files in the installation folder (Binaries.NoXaml) as explained in the step 1.
Could you kindly point to where these files are available or provide with the required files. We are using the Telerik Q1 2012 controls.
We have plans to upgrade to the future Releases as they are available.
Kindly suggest.
Thank you & Regards,
Phani.
private
readonly
PersistenceManager _persistanceManager;
private
readonly
IsolatedStorageProvider _isoStorageProvider;
...
_alertsDataService = alertsDataService;
_persistanceManager =
new
PersistenceManager();
_isoStorageProvider =
new
IsolatedStorageProvider(_persistanceManager);
...
_isoStorageProvider.SaveToStorage();
_isoStorageProvider.LoadFromStorage();