Skip to content

Commit d93c4e5

Browse files
committed
Initial draft of content for 11B printer APIs
1 parent ddf4308 commit d93c4e5

8 files changed

Lines changed: 232 additions & 0 deletions

windows.applicationmodel.activation/activationkind.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,10 @@ The app was activated in response to a phone call.
203203

204204
The app is a VPN foreground app that was activated by the plugin. For more details, see [VpnChannel.ActivateForeground](../windows.networking.vpn/ivpnplugin_encapsulate_494498240.md).
205205

206+
### -field PrintSupportEnterpriseManagementUI: 1027
207+
208+
The app is a print support app that was activated by the Print Management Console.
209+
206210
## -remarks
207211

208212
Values are mutually exclusive and cannot be combined. Each one relates to a different type of activation, and an app instance can be activated in only one way at a time.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
-api-id: M:Windows.Devices.Printers.IppPrintDevice.GetDeviceProperties
3+
-api-type: winrt method
4+
---
5+
6+
# Windows.Devices.Printers.IppPrintDevice.GetDeviceProperties
7+
8+
<!--
9+
public Windows.Foundation.Collections.ValueSet GetDeviceProperties ();
10+
-->
11+
12+
13+
## -description
14+
15+
Gets a collection of properties associated with an Internet Printing Protocol (IPP) printer device.
16+
17+
## -returns
18+
19+
A [ValueSet](/uwp/api/windows.foundation.collections.valueset) containing the property names and values from the printer device.
20+
21+
## -remarks
22+
23+
To update the properties for a printer device, call [ReplaceDeviceProperties](ippprintdevice_replacedeviceproperties_1875570505.md).
24+
25+
## -see-also
26+
27+
## -examples
28+
29+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
-api-id: M:Windows.Devices.Printers.IppPrintDevice.ReplaceDeviceProperties(Windows.Foundation.Collections.IIterable{Windows.Foundation.Collections.IKeyValuePair{System.String,System.Object}})
3+
-api-type: winrt method
4+
---
5+
6+
# Windows.Devices.Printers.IppPrintDevice.ReplaceDeviceProperties(Windows.Foundation.Collections.IIterable{Windows.Foundation.Collections.IKeyValuePair{System.String,System.Object}})
7+
8+
<!--
9+
public Windows.Devices.Printers.ReplaceDevicePropertiesResult ReplaceDeviceProperties (System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object>> deviceProperties);
10+
-->
11+
12+
13+
## -description
14+
15+
Replaces the collection of properties associated with an Internet Printing Protocol (IPP) printer device.
16+
17+
## -parameters
18+
19+
### -param deviceProperties
20+
21+
An enumerable collection of key value pairs containing the new set of properties for the printer device.
22+
23+
## -returns
24+
25+
A [ReplaceDevicePropertiesResult](replacedevicepropertiesresult.md) object containing information about the result of the operation.
26+
27+
## -remarks
28+
29+
## -see-also
30+
31+
## -examples
32+
33+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
-api-id: T:Windows.Devices.Printers.ReplaceDevicePropertiesResult
3+
-api-type: winrt class
4+
---
5+
6+
# Windows.Devices.Printers.ReplaceDevicePropertiesResult
7+
8+
<!--
9+
public sealed class ReplaceDevicePropertiesResult
10+
-->
11+
12+
13+
## -description
14+
15+
Provides information about the result of a call to [ReplaceDeviceProperties](ippprintdevice_replacedeviceproperties_1875570505.md).
16+
17+
## -remarks
18+
19+
## -see-also
20+
21+
## -examples
22+
23+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
-api-id: P:Windows.Devices.Printers.ReplaceDevicePropertiesResult.ExtendedError
3+
-api-type: winrt property
4+
---
5+
6+
# Windows.Devices.Printers.ReplaceDevicePropertiesResult.ExtendedError
7+
8+
<!--
9+
public System.Exception ExtendedError { get; }
10+
-->
11+
12+
13+
## -description
14+
15+
Gets extended information about the attribute set operation error for a call to [ReplaceDeviceProperties](ippprintdevice_replacedeviceproperties_1875570505.md).
16+
17+
## -property-value
18+
19+
Extended information.
20+
21+
## -remarks
22+
23+
## -see-also
24+
25+
## -examples
26+
27+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
-api-id: P:Windows.Devices.Printers.ReplaceDevicePropertiesResult.Status
3+
-api-type: winrt property
4+
---
5+
6+
# Windows.Devices.Printers.ReplaceDevicePropertiesResult.Status
7+
8+
<!--
9+
public Windows.Devices.Printers.ReplaceDevicePropertiesStatus Status { get; }
10+
-->
11+
12+
13+
## -description
14+
15+
Gets the status of a call to [ReplaceDeviceProperties](ippprintdevice_replacedeviceproperties_1875570505.md).
16+
17+
## -property-value
18+
19+
A value from the [ReplaceDevicePropertiesStatus](replacedevicepropertiesstatus.md) enumeration.
20+
21+
## -remarks
22+
23+
## -see-also
24+
25+
## -examples
26+
27+
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
-api-id: T:Windows.Devices.Printers.ReplaceDevicePropertiesStatus
3+
-api-type: winrt enum
4+
---
5+
6+
# Windows.Devices.Printers.ReplaceDevicePropertiesStatus
7+
8+
<!--
9+
public enum ReplaceDevicePropertiesStatus
10+
-->
11+
12+
13+
## -description
14+
15+
Specifies the status associated with a call to [ReplaceDeviceProperties](ippprintdevice_replacedeviceproperties_1875570505.md).
16+
17+
## -enum-fields
18+
19+
### -field Succeeded: 0
20+
21+
The call succeeded.
22+
23+
### -field AccessDenied: 1
24+
25+
Access to the device properties was denied.
26+
27+
### -field OtherFailure: 2
28+
29+
Another failure occurred. More information about the failure may be obtained by checking the [ExtendedError](replacedevicepropertiesresult_extendederror.md) property.
30+
31+
## -remarks
32+
33+
## -see-also
34+
35+
## -examples
36+
37+
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
-api-id: T:Windows.Graphics.Printing.PrintSupport.PrintSupportEnterpriseManagementUIEventArgs
3+
-api-type: winrt class
4+
---
5+
6+
# Windows.Graphics.Printing.PrintSupport.PrintSupportEnterpriseManagementUIEventArgs
7+
8+
<!--
9+
public sealed class PrintSupportEnterpriseManagementUIEventArgs
10+
-->
11+
12+
13+
## -description
14+
15+
Provides activation args that allow print support apps to query and update properties of Internet Printing Protocol (IPP) printer devices.
16+
17+
## -remarks
18+
19+
Get an instance of this class by casting the [IActivatedEventArgs](/uwp/api/windows.applicationmodel.activation.iactivatedeventargs) passed into the [OnActivated](/uwp/api/windows.ui.xaml.application.onactivated) event. Verify that the activation [Kind](/uwp/api/windows.applicationmodel.activation.iactivatedeventargs.kind) is [PrintSupportEnterpriseManagementUI](/uwp/api/windows.applicationmodel.activation.activationkind) before casting the args object.
20+
21+
## -see-also
22+
23+
## -examples
24+
25+
The following example illustrates the use of **PrintSupportEnterpriseManagementUIEventArgs** to get a reference to an IPP printer and then obtain the device properties associated with the printer. In this example, app-defined logic navigates the user to different UI depending on current state of the device properties.
26+
27+
```csharp
28+
protected override void OnActivated(IActivatedEventArgs args)
29+
{
30+
if (args.Kind == ActivationKind.PrintSupportEnterpriseManagementUI)
31+
{
32+
var managementUIArgs = (PrintSupportEnterpriseManagementUIEventArgs)args;
33+
IppPrintDevice ippPrintDevice = managementUIArgs.Printer;
34+
ValueSet deviceProperties = ippPrintDevice.GetDeviceProperties();
35+
36+
var rootFrame = new Frame();
37+
38+
if (AreDevicePropertiesIntialized(deviceProperties))
39+
{
40+
rootFrame.Navigate(typeof(PrinterManagementView), ippPrintDevice);
41+
}
42+
else
43+
{
44+
rootFrame.Navigate(typeof(PrinterManagementIntializeView), ippPrintDevice);
45+
}
46+
47+
Window.Current.Content = rootFrame;
48+
}
49+
}
50+
```
51+
52+

0 commit comments

Comments
 (0)