I have a DataGrid where an additional parameter exists at a DataGridRow. I want to test this parameter with FlaUi. I have already read up a bit on AutomationPeers. As far as I understand you have to create a new AutomationPeer and make the parameter available there. My problem is that the DataGridRowAutomationPeer is seald and I can't derive from it. Does anyone know why MS did this? And is there possibly a simpler variant?
Thanks in advance :-)
Related
I am trying to get all selected items in a solution and this with native code. With native code I am referring to code which does not use the DTE.
I checked the documentation and tried to find a suitable solution, however I din't come very far. What I found was the IVsUiHierarchy which contains the ExecCommand method which contains the following.
Commands that act on a specific item within the hierarchy. (If ItemID equals VSITEMID_SELECTION, the command is applied to the selected item or items.)
So I suspect the method they are talking about, is the before mentioned ExecCommand one. For one I am not quite sure how I will get to the IVsHierarchy object from a IVsHierarchy or similar, on the other hand I am not really sure on how to use the ExecCommand method properly. Additionally I am not even quite certain, if this is even the 'right way' of approaching this.
Note: I am searching for a solution which does not contain the following code in this answer.
You can use IVsMonitorSelection.GetCurrentSelection, to identify all the selected items in the solution explorer.
The above will return you an IVsMultItemSelect interface which you can use to invoke IVsMultiItemSelect.GetSelectedItems to retrieve an array of VSITEMSELECTION values.
There are a few extensibilty samples, that utilize GetSelectedItems, you can use as a reference.
Sincerely,
Ed Dore
I am trying to implement the answer in this so question
The problem is, that in xamarin forms 2 ingredients do not exist (or I have not found them yet):
Binding.IndexerName
Binding.ProvideValue()
I do not know why they do not exist. Maybe nobody has implemented them, maybe there is a technical reason why they cannot be implemented.
Can I still get the in xamarin forms?
Maybe in another way?
First, note that this answer probably doesn't work with Xamarin.Forms, or at least not with XamlC on.
If you want to get that working, your MarkupExtensions have to implement IMarkupExtension<BindingBase> instead of IMarkupExtension.
ProvideValue() is not defined in the Binding class, but in BindingExtension, but you probably won't win anything by instantiating a BindingExtension and calling ProvideValue on it versus returning the Binding directly.
The IndexerName refers to the IndexerName attribute of the Translator class. As you're not using it, the default is "Item", and you can use that hardcoded value.
I have a DevExpress dxe:TextEdit control with EditValueType="{x:Type system:Decimal}". I would like this TextEdit control to display and accept values that are 10,000 times the actual value. E.g., if someone enters 15, it should save the actual value as .0015. And if the value in the viewmodel is .0015, it should display 15.
I am new to WPF and I am not sure the best way to accomplish this. It seems like I can't do it with format strings, but I could be wrong. A value converter seems like overkill. I also thought about modifying the setter on my model object, but I don't think that would work, and it seems sort of hack-y.
I've worked with DevExpress a while ago.
As far as I can remember, you can create your own TextEdit class. (Derive from TextEditBase or even go further and derive from BaseEdit).
However, talking about over-killing, I think this is a much greater over-kill than just creating a converter, which will be a really good solution IMHO.
I would use the get/set functions to accomplish this. Perfect way of using them to translate presentation format to/from storage format.
I now learning BHO, me need write plugin for InternetExplorer, which will be edit values in navigator object, for example property appName.
On this page http://msdn.microsoft.com/en-us/library/ie/ms535867%28v=vs.85%29.aspx this property not read only.
A am use C#.
Do you think it is possible to edit navigator.appName and how? Please!, help!
Me need this for functional testing my web applications, I am php programmatic and writing BHO very hard for me.
If I understood you correctly - you need to override read-only properties of Navigator. It can be done without BHO/Plugins but with pure JavaScript code.
If you really need it - you can define a new property on top of the Navigator old property via defineProperty method:
Object.defineProperty(navigator, "appName", { value: "newValue" });
IMO, it's a dirty hack and please think twice whether you would like to proceed with such approach of functional testing.
Task:
Rip through all the code in the entire solution and wrap all webservice method-calls in another ws method-call that accepts a GUID (it's a login scenario)
Background :
Hundreds of web services, add token security. As explained to me when I was assigned to the task, we do it this way because if, in the future , some changes to security etc have to be made we can just do it in the WrappermethodClass in stead of having to change hundreds of web services
Tried and failed :
Find all references : too much data , returned more than 1000 hits , most of which are useless as they're only object references.
Rename WS so all references beak, build the project I'm working on and fix as I go : works well with the services not integral to the functionality but as soon as I do it with an important one it's like I shot the Solution through the brain, everything's f****d and and VS just gives up trying.
Current Solution :Open all relevant docs, Find ,select All Open Docs, skip through.
Question : How do I do this as efficiently as possible?
Code (before) :
wsGeneric wsGen = new wsGeneric();
wsGen.DoSomething();
Code (after) :
WrapperMethodClass.DoCheck takes params of (Action, GUID),
wsGeneric wsGen = new wGeneric();
wrapperMethodClass.DoCheck((g) =>
{ wsGen.UserInfo.token = g.ToString();
wsGen.DoSomething();
},Shell.token.Value);
Don´t you have some sort of interface or class where you changed the method signature already?
If you changed your webservice and your Code still compiles i´d say you did something wrong or i don´t understand the question.
Update:
I still don´t get it.
I think you have these options:
Change the method signature (all calls should be broken now, fix all the errors vs gives you and you should be done)
Find all references (of the method, not your webservice-class) and change the calls
If above isn´t possible use "Find in Files" and search for the method-name
If all your webservices inherit from an interface or base class you can refactor this method to add a parameter, all inheriting classes will also have the parameter.
If you pass a login object to each webservice, you can add a GUID element to this object and you're done.
It would be a lot easier if you showed us some code, some function interfaces that you have to change and how.
A better solution may be to just use PostSharp to add the checks to your services. This will solve your business problem (you only need to update your aspects) and is much less error prone then your current approach since you don't have to wory about some new developer forgetting to make the call to DoCheck.
Not having to find all references is a side benefit.