Is there a CommandParameter in XAML/WinRT? - xaml

Can a CommandParameter be passed to a Command in WinRT? How?

Actually, I may have misunderstood your question entirely. If you are talking about UI commands (commands that implement the ICommand interface) you can pass parameters when you call Execute. You can also test if the command and parameters are valid before executing the command by calling CanExecute.
As for passing a parameter as part of a Button binding, set the Command property equal to the command you want the button to execute and set the CommandParameter property equal to the parameter you want to pass.

Yes and no. WinRT applications can receive parameters through the Application.OnLaunched override.
The override receives an instance of type LaunchActivatedEventArgs which includes the arguments.
So it is possible to receive arguments, the question is more about how they can be passed.
Windows Store (WinRT) applications cannot be started from the command line. If a WinRT application is associated with a file type, it can be launched by calling ShellExecute on a file. Other than that, the application cannot be started directly.
It is possible to write C++ that launches a WinRT application using the IAplicationActivationManager interface and this interface can pass parameters to the launched application. So you could create a C++ launcher executable that could be called from the command line.
For more information on how to launch an application using this interface, see the following forum post:
http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/thread/a4d2fca1-4034-4cc7-a86a-6242ce1a8b16

Related

How to add a property page to DirectShow filter

I have written an DirectShow-Filter *.ax to integrate a Hardware (Camera). All works fine with my filter.ax and there Transport Images to Skype success.
Now I am want to integrate a Dialog to handle the camera-options with UI.
In my Filter.ax is calling the function QueryInterface(REFIID riid, void **ppv)
when riid == IID_ISpecifyPropertyPages
I am have seen that the Dialog must be in a other DLL like Com ?
My try to open the Dialog directly works, but no windows Messages are incoming.
I must also write an MFC Dll they is starting by PropertyPage IIID ? My Propertypage is a large MFC Controles TabControl with some items. I can see it if i start the filter from MFC Test app. AfxInit I can't execute. (Wrong Lib versions I must use the directshow baseclass(knowledge example)
I don't now why my Dialog got no Messages, what is the right way ?
You don't need to implement a property page in a separate DLL (even though it is a possible).
DirectShow filter property pages are regular COM property pages implemented using ISpecifyPropertyPages. Property pages are separate COM objects implementing well known interfaces like IPropertyPage.
Windows SDK Ezrgb24 sample shows how to implement a simple transform filter and also features a property page (CEZrgb24Properties class). It should be a good start for a property page implementation for your filter.
If you prefer to implement the property page in a separate DLL, a typical way is to define a shared COM interface, the filter would implement it and reference the property page by its CLSID, the property page would query this interface from the filter instance and use it for configuration actions.

How does a Qt GUI application runs

how does a gui application in qt5 runs, what is the ui pointers role in it. I'm new to qt pls help me,Why we will pass this in the constructor like, Ui->setup(this).Thanks in advance.
Long story short: the uic parses the xml that Qt Designer generates (from form you create into the designer) and creates C++ code from that xml, and you need to use that code into your window class, there are many ways you can use that code, see the documentation and using that ui pointer is one of those ways (actually that is a pointer to an instance of a class from the generated code) as for how setupUi actually works you can see into the generated code - short answer is: it creates the form's layouts and widgets as children of this.

Passing file name in Custom Action using WiX

I want to pass a file name in the argument of Custom Action. These files are getting installed into the system. Can I pass the component id of these files rather than passing hard coded name?
Since Wix has provided Session variables to communicate with C# custom actions ....assign your files path in some Session variable and use it in custom action...
Make sure that the variable name should be in CAPS

Eclipse Plugin: Adding handlers programmatically vs. added via extension framework

I have in my Eclipse plugin some programmatically defined handlers (for instance cut/copy/paste) and some other editor related actions that are defined via the extension framework.
If I close the view of my plugin and reopen it the handlers defined via extension framework seems to break and when executed seems to use disposed gui elements. The programmatically one are readded in the createViewPart() Method and keep working.
I don't get how to reload the handlers defined via extension framework?
In handlers added through the extension framework, they are expected to get what then need to operate from the ExecutionEvent that's provided in the execute(*) method. org.eclipse.ui.handlers.HandlerUtil can extract most of the workbench related information for you.
Saving state in your handler between calls is not guaranteed to work, as the framework can dispose and recreate the handler as it needs to.

Get WiX property value from output of command?

Is there a way to execute a command (in PoSh, ideally) and assign the output to the value of a property in WiX? So far, all I have seen is custom actions that will run a command, but not capture output or set a property's value.
Custom actions can access the Wix Session and set a property on the session that can be read out later.
This is C# code but it would be similar in PS
[CustomAction]
public static ActionResult myaction(Session session)
{
session["myvariable"] = "myvalue";
}
After the action has been executed you can access it in the UI as if it where a normal property. Be aware though that if you are planning on changing the UI to respond to this you will need to use a hack to make the wix UI realise that the value has changed...see my answer in this SO question Wix Interactions with Conditions, Properties & Custom Actions