diff --git a/CHANGELOG.md b/CHANGELOG.md
index eaed42b..e372472 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [0.2.2] / 2023-08-14
+### Features
+- Add `XmlnsPrefix` and `XmlnsDefinition` to `Revit.Busy` namespace.
### Updated
- Update references to work with net code.
- Clear main project and move files to `Example`
diff --git a/Directory.Build.props b/Directory.Build.props
index dc550c4..428e9f9 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,5 +1,5 @@
- 0.2.2-alpha
+ 0.2.2-alpha.1
\ No newline at end of file
diff --git a/README.md b/README.md
index 76bfcfc..abdeace 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ RevitBusyControl.Initialize(application);
Binding to the `IsRevitBusy` property.
```xml
-xmlns:busy="clr-namespace:Revit.Busy"
+xmlns:busy="http://schemas.revit.busy.com/2024/xaml/presentation"
```
```xml
{Binding IsRevitBusy, Source={x:Static busy:RevitBusyControl.Control}}
diff --git a/Revit.Busy.Example/Revit/App.cs b/Revit.Busy.Example/Revit/App.cs
index 0f33355..ae870ba 100644
--- a/Revit.Busy.Example/Revit/App.cs
+++ b/Revit.Busy.Example/Revit/App.cs
@@ -13,7 +13,7 @@ public class App : IExternalApplication
public static IRevitTask RevitTask => revitTaskService;
private static RibbonPanel ribbonPanel;
- private static RevitBusyService RevitBusyService;
+ public static RevitBusyService RevitBusyService;
public Result OnStartup(UIControlledApplication application)
{
revitTaskService = new RevitTaskService(application);
@@ -27,6 +27,7 @@ public Result OnStartup(UIControlledApplication application)
.SetLargeImage("/UIFrameworkRes;component/ribbon/images/revit.ico");
RevitBusyService = new RevitBusyService(application);
+ RevitBusyService.SetInterval(100);
RevitBusyService.PropertyChanged += (s, e) =>
{
UpdateLargeImageBusy(ribbonItem, RevitBusyService.IsRevitBusy);
diff --git a/Revit.Busy.Example/Revit/Views/BusyView.xaml b/Revit.Busy.Example/Revit/Views/BusyView.xaml
index 1a82115..37d9a2a 100644
--- a/Revit.Busy.Example/Revit/Views/BusyView.xaml
+++ b/Revit.Busy.Example/Revit/Views/BusyView.xaml
@@ -5,23 +5,30 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Revit.Busy.Example.Revit.Views"
- xmlns:busy="clr-namespace:Revit.Busy.Example.Revit.Views"
+ xmlns:busy="http://schemas.revit.busy.com/2024/xaml/presentation"
mc:Ignorable="d"
- Background="WhiteSmoke"
- >
-
+ Background="WhiteSmoke">
-
-
-
+
+
+
+
+
+
+
-
-
+ Height="24"
+ Width="240"
+ Command="{Binding ButtonDeleteCommand}">Delete Element
+
+
diff --git a/Revit.Busy.Example/Revit/Views/BusyView.xaml.cs b/Revit.Busy.Example/Revit/Views/BusyView.xaml.cs
index bf394bb..b99c5df 100644
--- a/Revit.Busy.Example/Revit/Views/BusyView.xaml.cs
+++ b/Revit.Busy.Example/Revit/Views/BusyView.xaml.cs
@@ -11,6 +11,7 @@ namespace Revit.Busy.Example.Revit.Views
public partial class BusyView : Window
{
public IAsyncRelayCommand ButtonCommand { get; private set; }
+ public IAsyncRelayCommand ButtonDeleteCommand { get; private set; }
public BusyView()
{
ButtonCommand = new AsyncRelayCommand(async () =>
@@ -25,6 +26,18 @@ await App.RevitTask.Run((uiapp) =>
});
});
+ ButtonDeleteCommand = new AsyncRelayCommand(async () =>
+ {
+ await App.RevitTask.Run((uiapp) =>
+ {
+ uiapp.PostCommand(Autodesk.Revit.UI.RevitCommandId.LookupPostableCommandId(Autodesk.Revit.UI.PostableCommand.Delete));
+ });
+ await App.RevitTask.Run((uiapp) =>
+ {
+ // This is just to force the `AsyncRelayCommand` to wait the PostCommand to finish.
+ });
+ });
+
this.Title = "Wall - BusyView";
InitializeComponent();
InitializeWindow();
@@ -42,9 +55,9 @@ private void InitializeWindow()
#endregion
}
- public class Controls
+ public class RevitBusyControl
{
- public static RevitBusyService Control => RevitBusyControl.Control;
+ public static RevitBusyService Control => App.RevitBusyService;
}
[ValueConversion(typeof(bool), typeof(bool))]
diff --git a/Revit.Busy/Properties/AssemblyInfo.cs b/Revit.Busy/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..46e199b
--- /dev/null
+++ b/Revit.Busy/Properties/AssemblyInfo.cs
@@ -0,0 +1,4 @@
+using System;
+using System.Windows.Markup;
+[assembly: XmlnsPrefix("http://schemas.revit.busy.com/2024/xaml/presentation", "revit.busy")]
+[assembly: XmlnsDefinition("http://schemas.revit.busy.com/2024/xaml/presentation", "Revit.Busy")]
\ No newline at end of file